summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-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.