Return error on shutdown call

Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@docker.com> (github: crosbymichael)
This commit is contained in:
Michael Crosby 2014-06-26 14:18:39 -07:00
parent bd7d1eb7b6
commit a980a961c1
1 changed files with 3 additions and 2 deletions

View File

@ -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 {