aboutsummaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2018-07-12 17:09:57 -0400
committerAtomic Bot <atomic-devel@projectatomic.io>2018-07-13 14:14:42 +0000
commit299f471d1f897f173ccbbaa883b420e4c49201c9 (patch)
treeff045bf1db4d12ba0315892ecad3e51821b285ab /cmd
parent6f1dd44b29be4a3046c3bcd5d4d44f7acc5f88fc (diff)
downloadpodman-299f471d1f897f173ccbbaa883b420e4c49201c9.tar.gz
podman-299f471d1f897f173ccbbaa883b420e4c49201c9.tar.bz2
podman-299f471d1f897f173ccbbaa883b420e4c49201c9.zip
If proxy fails then then signal should be sent to the main process
This way ^c will actually kill the host process if the container is not actually running. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com> Closes: #1086 Approved by: baude
Diffstat (limited to 'cmd')
-rw-r--r--cmd/podman/sigproxy.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/cmd/podman/sigproxy.go b/cmd/podman/sigproxy.go
index fd1415dc6..388e23439 100644
--- a/cmd/podman/sigproxy.go
+++ b/cmd/podman/sigproxy.go
@@ -25,6 +25,8 @@ func ProxySignals(ctr *libpod.Container) {
if err := ctr.Kill(uint(s.(syscall.Signal))); err != nil {
logrus.Errorf("Error forwarding signal %d to container %s: %v", s, ctr.ID(), err)
+ signal.StopCatch(sigBuffer)
+ syscall.Kill(syscall.Getpid(), s.(syscall.Signal))
}
}
}()