diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-07-01 12:53:00 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-01 12:53:00 -0400 |
commit | a855b30f81cc72e67fc40b7301b98124ab0e6d01 (patch) | |
tree | f8b4865fe124a02dd0398e5f2b5bda6d7658b919 | |
parent | fd1715568b7c14451dcf2581c385c8d3e307d30e (diff) | |
parent | 493786fbae808f01bdf97d13b2ede2c527405899 (diff) | |
download | podman-a855b30f81cc72e67fc40b7301b98124ab0e6d01.tar.gz podman-a855b30f81cc72e67fc40b7301b98124ab0e6d01.tar.bz2 podman-a855b30f81cc72e67fc40b7301b98124ab0e6d01.zip |
Merge pull request #10837 from giuseppe/ignore-ESRCH
podman: ignore ESRCH from kill
-rw-r--r-- | pkg/rootless/rootless_linux.go | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/pkg/rootless/rootless_linux.go b/pkg/rootless/rootless_linux.go index 6eff25eb9..f76eab0e3 100644 --- a/pkg/rootless/rootless_linux.go +++ b/pkg/rootless/rootless_linux.go @@ -268,7 +268,9 @@ func becomeRootInUserNS(pausePid, fileToRead string, fileOutput *os.File) (_ boo } if retErr != nil && pid > 0 { if err := unix.Kill(pid, unix.SIGKILL); err != nil { - logrus.Errorf("failed to kill %d", pid) + if err != unix.ESRCH { + logrus.Errorf("failed to cleanup process %d: %v", pid, err) + } } C.reexec_in_user_namespace_wait(C.int(pid), 0) } @@ -394,7 +396,9 @@ func becomeRootInUserNS(pausePid, fileToRead string, fileOutput *os.File) (_ boo } if err := unix.Kill(int(pidC), s.(unix.Signal)); err != nil { - logrus.Errorf("failed to kill %d", int(pidC)) + if err != unix.ESRCH { + logrus.Errorf("failed to propagate signal to child process %d: %v", int(pidC), err) + } } } }() |