From ae35c0f70e96de011ad376c8fffba8e8a52ec21f Mon Sep 17 00:00:00 2001 From: Darren Stahl Date: Tue, 11 Oct 2016 18:03:12 -0700 Subject: [PATCH] Stop returning errors that should be ignored while closing stdin Signed-off-by: Darren Stahl --- libcontainerd/process_windows.go | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/libcontainerd/process_windows.go b/libcontainerd/process_windows.go index e435b3d22a..57ecc948d0 100644 --- a/libcontainerd/process_windows.go +++ b/libcontainerd/process_windows.go @@ -38,17 +38,14 @@ func createStdInCloser(pipe io.WriteCloser, process hcsshim.Process) io.WriteClo return err } - // We do not need to lock container ID here, even though - // we are calling into hcsshim. This is safe, because the - // only place that closes this process handle is this method. err := process.CloseStdin() - if err != nil && !hcsshim.IsNotExist(err) { + if err != nil && !hcsshim.IsNotExist(err) && !hcsshim.IsAlreadyClosed(err) { // This error will occur if the compute system is currently shutting down if perr, ok := err.(*hcsshim.ProcessError); ok && perr.Err != hcsshim.ErrVmcomputeOperationInvalidState { return err } } - return err + return nil }) }