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
This commit is contained in:
Daniel J Walsh
2018-07-12 17:09:57 -04:00
committed by Atomic Bot
parent 6f1dd44b29
commit 299f471d1f

View File

@ -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))
}
}
}()