Signed-off-by: Darren Stahl <darst@microsoft.com>
| ... | ... |
@@ -38,17 +38,14 @@ func createStdInCloser(pipe io.WriteCloser, process hcsshim.Process) io.WriteClo |
| 38 | 38 |
return err |
| 39 | 39 |
} |
| 40 | 40 |
|
| 41 |
- // We do not need to lock container ID here, even though |
|
| 42 |
- // we are calling into hcsshim. This is safe, because the |
|
| 43 |
- // only place that closes this process handle is this method. |
|
| 44 | 41 |
err := process.CloseStdin() |
| 45 |
- if err != nil && !hcsshim.IsNotExist(err) {
|
|
| 42 |
+ if err != nil && !hcsshim.IsNotExist(err) && !hcsshim.IsAlreadyClosed(err) {
|
|
| 46 | 43 |
// This error will occur if the compute system is currently shutting down |
| 47 | 44 |
if perr, ok := err.(*hcsshim.ProcessError); ok && perr.Err != hcsshim.ErrVmcomputeOperationInvalidState {
|
| 48 | 45 |
return err |
| 49 | 46 |
} |
| 50 | 47 |
} |
| 51 | 48 |
|
| 52 |
- return err |
|
| 49 |
+ return nil |
|
| 53 | 50 |
}) |
| 54 | 51 |
} |