diff options
| author | Ian Lance Taylor <iant@golang.org> | 2021-11-02 14:12:05 -0700 |
|---|---|---|
| committer | Ian Lance Taylor <iant@golang.org> | 2021-11-03 00:49:50 +0000 |
| commit | a4b2c579e92c001287fd7b549bc9f67bcf2bfe7b (patch) | |
| tree | 0cab43ad201e59f0d2b9edd966d21cbc12bcfcce /src | |
| parent | 8f0ca7dc720b7197c91e02c8cef6e19ad95978d0 (diff) | |
| download | go-a4b2c579e92c001287fd7b549bc9f67bcf2bfe7b.tar.xz | |
runtime: install sigPreempt signal handler for c-archive/c-shared
Fixes #49288
Change-Id: I7bfcbecbefa68871a3e556935a73f241fff44c0e
Reviewed-on: https://go-review.googlesource.com/c/go/+/360861
Trust: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Diffstat (limited to 'src')
| -rw-r--r-- | src/runtime/signal_unix.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/runtime/signal_unix.go b/src/runtime/signal_unix.go index 7c454437e4..dbcbfc67bc 100644 --- a/src/runtime/signal_unix.go +++ b/src/runtime/signal_unix.go @@ -167,8 +167,8 @@ func sigInstallGoHandler(sig uint32) bool { } // When built using c-archive or c-shared, only install signal - // handlers for synchronous signals and SIGPIPE. - if (isarchive || islibrary) && t.flags&_SigPanic == 0 && sig != _SIGPIPE { + // handlers for synchronous signals and SIGPIPE and sigPreempt. + if (isarchive || islibrary) && t.flags&_SigPanic == 0 && sig != _SIGPIPE && sig != sigPreempt { return false } |
