diff options
author | Heschi Kreinick <heschi@google.com> | 2022-05-10 16:48:37 -0400 |
---|---|---|
committer | Heschi Kreinick <heschi@google.com> | 2022-05-10 16:48:37 -0400 |
commit | 6b07de790c08967d0dbe3a36ec86f3d13e1cfcbd (patch) | |
tree | adb989cf6379ef90a35c68b7a1e0970cbc474b84 /src/runtime/signal_unix.go | |
parent | ed86dfc4e441ee7597586dd858fb87c987f1f3c8 (diff) | |
parent | 085c61ae517110168841be0afeb8f883d66fe95a (diff) | |
download | go-6b07de790c08967d0dbe3a36ec86f3d13e1cfcbd.tar.gz go-6b07de790c08967d0dbe3a36ec86f3d13e1cfcbd.zip |
[dev.boringcrypto.go1.17] all: merge go1.17.10 into dev.boringcrypto.go1.17
Change-Id: If81e53be5a9b4bd422668832fdadf716612426d8
Diffstat (limited to 'src/runtime/signal_unix.go')
-rw-r--r-- | src/runtime/signal_unix.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/runtime/signal_unix.go b/src/runtime/signal_unix.go index 6096760b50..33c3f2ee65 100644 --- a/src/runtime/signal_unix.go +++ b/src/runtime/signal_unix.go @@ -1151,6 +1151,7 @@ func unminitSignals() { // blockableSig reports whether sig may be blocked by the signal mask. // We never want to block the signals marked _SigUnblock; // these are the synchronous signals that turn into a Go panic. +// We never want to block the preemption signal if it is being used. // In a Go program--not a c-archive/c-shared--we never want to block // the signals marked _SigKill or _SigThrow, as otherwise it's possible // for all running threads to block them and delay their delivery until @@ -1161,6 +1162,9 @@ func blockableSig(sig uint32) bool { if flags&_SigUnblock != 0 { return false } + if sig == sigPreempt && preemptMSupported && debug.asyncpreemptoff == 0 { + return false + } if isarchive || islibrary { return true } |