diff options
author | Daniel J Walsh <dwalsh@redhat.com> | 2018-07-12 17:09:57 -0400 |
---|---|---|
committer | Atomic Bot <atomic-devel@projectatomic.io> | 2018-07-13 14:14:42 +0000 |
commit | 299f471d1f897f173ccbbaa883b420e4c49201c9 (patch) | |
tree | ff045bf1db4d12ba0315892ecad3e51821b285ab /cmd/podman | |
parent | 6f1dd44b29be4a3046c3bcd5d4d44f7acc5f88fc (diff) | |
download | podman-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/podman')
-rw-r--r-- | cmd/podman/sigproxy.go | 2 |
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)) } } }() |