aboutsummaryrefslogtreecommitdiff
path: root/libpod/oci.go
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivan@redhat.com>2018-10-18 09:47:14 +0200
committerGiuseppe Scrivano <gscrivan@redhat.com>2018-10-23 09:32:44 +0200
commitfc89065a800206567c8fe74841db300dff7abfad (patch)
treee6843ecccc303f826c0b103056b5de84b9e8482a /libpod/oci.go
parent58a26ac9dcb0d75ca7f061941c1399a28579ed69 (diff)
downloadpodman-fc89065a800206567c8fe74841db300dff7abfad.tar.gz
podman-fc89065a800206567c8fe74841db300dff7abfad.tar.bz2
podman-fc89065a800206567c8fe74841db300dff7abfad.zip
oci: cleanup process status
I've seen a runc zombie process hanging around, it is caused by not cleaning up the "$OCI status" process. Also adjust another location that has the same issue. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Diffstat (limited to 'libpod/oci.go')
-rw-r--r--libpod/oci.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/libpod/oci.go b/libpod/oci.go
index 6eaaa7a29..2257cd42f 100644
--- a/libpod/oci.go
+++ b/libpod/oci.go
@@ -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)