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>
This commit is contained in:
John Starks 2016-03-15 15:11:02 -07:00
parent 87c2aad6f1
commit 59573fb3c6
1 changed files with 7 additions and 1 deletions

View File

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