executor: Always close stdout/stderr fifos

This commit is contained in:
Danielle Tomlinson 2019-01-15 16:46:20 +01:00
parent 471fdb3ccf
commit 7f1ff3fab6
1 changed files with 1 additions and 2 deletions

View File

@ -374,6 +374,7 @@ func (e *UniversalExecutor) UpdateResources(resources *drivers.Resources) error
func (e *UniversalExecutor) wait() {
defer close(e.processExited)
defer e.commandCfg.Close()
pid := e.childCmd.Process.Pid
err := e.childCmd.Wait()
if err == nil {
@ -381,8 +382,6 @@ func (e *UniversalExecutor) wait() {
return
}
e.commandCfg.Close()
exitCode := 1
var signal int
if exitErr, ok := err.(*exec.ExitError); ok {