From a6f5b6a4858f6a79265fa9447dfa73e8a2c1c3e8 Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Wed, 18 Mar 2020 12:53:39 +0100 Subject: podman: avoid conmon zombie on exec conmon forks itself, so make sure we reap the first process and not leave a zombie process. Signed-off-by: Giuseppe Scrivano --- libpod/oci_conmon_linux.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'libpod') diff --git a/libpod/oci_conmon_linux.go b/libpod/oci_conmon_linux.go index a5530e448..d3c3bbcc5 100644 --- a/libpod/oci_conmon_linux.go +++ b/libpod/oci_conmon_linux.go @@ -774,6 +774,10 @@ func (r *ConmonOCIRuntime) ExecContainer(c *Container, sessionID string, options }() attachToExecCalled = true + if err := execCmd.Wait(); err != nil { + return -1, nil, errors.Wrapf(err, "cannot run conmon") + } + pid, err := readConmonPipeData(parentSyncPipe, ociLog) return pid, attachChan, err -- cgit v1.2.3-54-g00ecf