Ignore SIGURG signals in signal forwarder
Starting with go1.14, the go runtime hijacks SIGURG but with no way to not send to other signal handlers. In practice, we get this signal frequently. I found this while testing out go1.15 with ctr and multiple execs with only `echo hello`. When the process exits quickly, if the previous commit is not applied, you end up with an error message that it couldn't forward SIGURG to the container (due to the process being gone). Signed-off-by: Brian Goff <cpuguy83@gmail.com>
This commit is contained in:
@@ -37,6 +37,10 @@ func ForwardAllSignals(ctx gocontext.Context, task killer) chan os.Signal {
|
||||
signal.Notify(sigc)
|
||||
go func() {
|
||||
for s := range sigc {
|
||||
if canIgnoreSignal(s) {
|
||||
logrus.Debugf("Ignoring signal %s", s)
|
||||
continue
|
||||
}
|
||||
logrus.Debug("forwarding signal ", s)
|
||||
if err := task.Kill(ctx, s.(syscall.Signal)); err != nil {
|
||||
if errdefs.IsNotFound(err) {
|
||||
|
Reference in New Issue
Block a user