From f458a325e9b6aecf2ee198de19063505c48a14d7 Mon Sep 17 00:00:00 2001 From: Ting-Yu Wang Date: Fri, 13 Mar 2020 11:25:49 -0700 Subject: Fix "application exiting with {Code:0 Signo:27}" during boot. 2aa9514a06a5e34894e606d508ac2df53b082c74 skips SIGURG, but later code expects the sigchans array contains consecutive signal numbers. PiperOrigin-RevId: 300793450 --- pkg/sentry/sighandling/sighandling.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'pkg') diff --git a/pkg/sentry/sighandling/sighandling.go b/pkg/sentry/sighandling/sighandling.go index 959ef7217..83195d5a1 100644 --- a/pkg/sentry/sighandling/sighandling.go +++ b/pkg/sentry/sighandling/sighandling.go @@ -83,12 +83,13 @@ func StartSignalForwarding(handler func(linux.Signal)) func() { // for their handling. var sigchans []chan os.Signal for sig := 1; sig <= numSignals+1; sig++ { + sigchan := make(chan os.Signal, 1) + sigchans = append(sigchans, sigchan) + // SIGURG is used by Go's runtime scheduler. if sig == int(linux.SIGURG) { continue } - sigchan := make(chan os.Signal, 1) - sigchans = append(sigchans, sigchan) signal.Notify(sigchan, syscall.Signal(sig)) } // Start up our listener. -- cgit v1.2.3