summaryrefslogtreecommitdiffhomepage
path: root/pkg
diff options
context:
space:
mode:
authorTing-Yu Wang <anivia@google.com>2020-03-13 11:25:49 -0700
committergVisor bot <gvisor-bot@google.com>2020-03-13 11:26:45 -0700
commitf458a325e9b6aecf2ee198de19063505c48a14d7 (patch)
treea833c2762c14fee3077c7b2e26f7c5999e520cc9 /pkg
parent28d26d2c4f231c447a10bcbcfb8223a804c9d8bc (diff)
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
Diffstat (limited to 'pkg')
-rw-r--r--pkg/sentry/sighandling/sighandling.go5
1 files changed, 3 insertions, 2 deletions
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.