mirror of
https://github.com/containers/podman.git
synced 2025-06-21 17:38:12 +08:00
Merge pull request #1681 from giuseppe/cleanup-runtime-status
oci: cleanup process status
This commit is contained in:
@ -378,6 +378,7 @@ func (r *OCIRuntime) createOCIContainer(ctr *Container, cgroupParent string, res
|
|||||||
childPipe.Close()
|
childPipe.Close()
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
defer cmd.Wait()
|
||||||
|
|
||||||
// We don't need childPipe on the parent side
|
// We don't need childPipe on the parent side
|
||||||
childPipe.Close()
|
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)
|
return errors.Wrapf(err, "error getting container %s state. stderr/out: %s", ctr.ID(), out)
|
||||||
}
|
}
|
||||||
|
defer cmd.Wait()
|
||||||
|
|
||||||
errPipe.Close()
|
errPipe.Close()
|
||||||
out, err := ioutil.ReadAll(outPipe)
|
out, err := ioutil.ReadAll(outPipe)
|
||||||
|
Reference in New Issue
Block a user