diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-01-31 08:32:26 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-31 08:32:26 -0800 |
commit | 781fc827c6dbcdd4911ab28f952d9178d803852d (patch) | |
tree | b3f1805430b616d198912ce7c93060b70d2b0018 | |
parent | 1cf4b72a6ea8f6fe8344e91badd19a8fe264193e (diff) | |
parent | 868ee6db7057a63e09dc67b7448a6f13efcdddd3 (diff) | |
download | podman-781fc827c6dbcdd4911ab28f952d9178d803852d.tar.gz podman-781fc827c6dbcdd4911ab28f952d9178d803852d.tar.bz2 podman-781fc827c6dbcdd4911ab28f952d9178d803852d.zip |
Merge pull request #5036 from vrothberg/fix-5034
sigproxy: return after closing the channel
-rw-r--r-- | pkg/adapter/sigproxy_linux.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/pkg/adapter/sigproxy_linux.go b/pkg/adapter/sigproxy_linux.go index ebfeab725..35745a6aa 100644 --- a/pkg/adapter/sigproxy_linux.go +++ b/pkg/adapter/sigproxy_linux.go @@ -25,11 +25,17 @@ func ProxySignals(ctr *libpod.Container) { } if err := ctr.Kill(uint(s.(syscall.Signal))); err != nil { + // If the container dies, and we find out here, + // we need to forward that one signal to + // ourselves so that it is not lost, and then + // we terminate the proxy and let the defaults + // play out. logrus.Errorf("Error forwarding signal %d to container %s: %v", s, ctr.ID(), err) signal.StopCatch(sigBuffer) if err := syscall.Kill(syscall.Getpid(), s.(syscall.Signal)); err != nil { logrus.Errorf("failed to kill pid %d", syscall.Getpid()) } + return } } }() |