diff options
author | Giuseppe Scrivano <gscrivan@redhat.com> | 2020-03-18 12:53:39 +0100 |
---|---|---|
committer | Giuseppe Scrivano <gscrivan@redhat.com> | 2020-03-18 12:58:14 +0100 |
commit | a6f5b6a4858f6a79265fa9447dfa73e8a2c1c3e8 (patch) | |
tree | b5e54fc176b93cd56638752e686b602dec6fc180 /libpod | |
parent | 2b2996d09d1d99c41a5c944b597e6b0c83ab23ee (diff) | |
download | podman-a6f5b6a4858f6a79265fa9447dfa73e8a2c1c3e8.tar.gz podman-a6f5b6a4858f6a79265fa9447dfa73e8a2c1c3e8.tar.bz2 podman-a6f5b6a4858f6a79265fa9447dfa73e8a2c1c3e8.zip |
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 <gscrivan@redhat.com>
Diffstat (limited to 'libpod')
-rw-r--r-- | libpod/oci_conmon_linux.go | 4 |
1 files changed, 4 insertions, 0 deletions
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 |