Merge pull request #1681 from giuseppe/cleanup-runtime-status

oci: cleanup process status
This commit is contained in:
OpenShift Merge Robot 2018-10-23 05:17:21 -07:00 committed by GitHub
commit fca5ad095e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -378,6 +378,7 @@ func (r *OCIRuntime) createOCIContainer(ctr *Container, cgroupParent string, res
childPipe.Close()
return err
}
defer cmd.Wait()
// We don't need childPipe on the parent side
childPipe.Close()
@ -478,6 +479,7 @@ func (r *OCIRuntime) updateContainerStatus(ctr *Container) error {
}
return errors.Wrapf(err, "error getting container %s state. stderr/out: %s", ctr.ID(), out)
}
defer cmd.Wait()
errPipe.Close()
out, err := ioutil.ReadAll(outPipe)