Windows: add support for CloseWrite() to npipe transport

This relies on changes to go-winio to support CloseWrite() when the pipe
is in message mode. This fixes an issue where stdin is not properly closed
when there is no more input to docker run.

Signed-off-by: John Starks <jostarks@microsoft.com>
Upstream-commit: 59573fb3c6e8e55278c973b9c799db6ed9c0f9c7
Component: engine
This commit is contained in:
John Starks
2016-03-15 18:25:35 -07:00
parent be26fc7c6f
commit 79f5e01124
@@ -32,7 +32,13 @@ func Init(proto, addr, socketGroup string, tlsConfig *tls.Config) (ls []net.List
sddl += fmt.Sprintf("(A;;GRGW;;;%s)", sid)
}
}
l, err := winio.ListenPipe(addr, sddl)
c := winio.PipeConfig{
SecurityDescriptor: sddl,
MessageMode: true, // Use message mode so that CloseWrite() is supported
InputBufferSize: 65536, // Use 64KB buffers to improve performance
OutputBufferSize: 65536,
}
l, err := winio.ListenPipe(addr, &c)
if err != nil {
return nil, err
}