aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/runtime2.go
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2017-11-22 19:12:12 -0800
committerIan Lance Taylor <iant@golang.org>2017-11-30 23:29:30 +0000
commiteb97160f46cb18770ccb0bd57a08457c9ff20ccc (patch)
tree2f7760872111605d145d8c0d67b3a54fe019aa54 /src/runtime/runtime2.go
parentb23096b514e6290b1ff31183516378fe91e16251 (diff)
downloadgo-eb97160f46cb18770ccb0bd57a08457c9ff20ccc.tar.xz
runtime: don't block signals that will kill the program
Otherwise we may delay the delivery of these signals for an arbitrary length of time. We are already careful to not block signals that the program has asked to see. Also make sure that we don't miss a signal delivery if a thread decides to stop for a while while executing the signal handler. Also clean up the TestAtomicStop output a little bit. Fixes #21433 Change-Id: Ic0c1a4eaf7eba80d1abc1e9537570bf4687c2434 Reviewed-on: https://go-review.googlesource.com/79581 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Austin Clements <austin@google.com>
Diffstat (limited to 'src/runtime/runtime2.go')
-rw-r--r--src/runtime/runtime2.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/runtime/runtime2.go b/src/runtime/runtime2.go
index 0e7ef2fda2..c75f0b1b7a 100644
--- a/src/runtime/runtime2.go
+++ b/src/runtime/runtime2.go
@@ -622,7 +622,7 @@ const (
_SigDefault // if the signal isn't explicitly requested, don't monitor it
_SigGoExit // cause all runtime procs to exit (only used on Plan 9).
_SigSetStack // add SA_ONSTACK to libc handler
- _SigUnblock // unblocked in minit
+ _SigUnblock // always unblock; see blockableSig
_SigIgn // _SIG_DFL action is to ignore the signal
)