Skip to content

Commit

Permalink
Return error on shutdown call
Browse files Browse the repository at this point in the history
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@docker.com> (github: crosbymichael)
  • Loading branch information
Michael Crosby committed Jun 26, 2014
1 parent bd7d1eb commit a980a96
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions namespaces/sync_pipe.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,10 @@ func (s *SyncPipe) SendToChild(networkState *network.NetworkState) error {
if err != nil {
return err
}

s.parent.Write(data)
syscall.Shutdown(int(s.parent.Fd()), syscall.SHUT_WR)
return nil

return syscall.Shutdown(int(s.parent.Fd()), syscall.SHUT_WR)
}

func (s *SyncPipe) ReadFromChild() error {
Expand Down

0 comments on commit a980a96

Please sign in to comment.