From 5523936cf50a51dd12981a198faa198f3427c68b Mon Sep 17 00:00:00 2001 From: Kenfe-Mickael Laventure Date: Tue, 16 May 2017 14:10:06 -0700 Subject: [PATCH] Close stdin on create if it wasn't requested and there's no terminal Signed-off-by: Kenfe-Mickael Laventure --- linux/shim/io.go | 1 + 1 file changed, 1 insertion(+) diff --git a/linux/shim/io.go b/linux/shim/io.go index 66b79398d..49ba8e069 100644 --- a/linux/shim/io.go +++ b/linux/shim/io.go @@ -83,6 +83,7 @@ func copyPipes(ctx context.Context, rio runc.IO, stdin, stdout, stderr string, w dest(fw, fr) } if stdin == "" { + rio.Stdin().Close() return nil } f, err := fifo.OpenFifo(ctx, stdin, syscall.O_RDONLY, 0)