]> Cypherpunks repositories - gostls13.git/commit
runtime: treat SI_TKILL like SI_USER on Linux
authorIan Lance Taylor <iant@golang.org>
Thu, 15 Sep 2022 18:33:58 +0000 (11:33 -0700)
committerGopher Robot <gobot@golang.org>
Sat, 17 Sep 2022 01:41:08 +0000 (01:41 +0000)
commit7c87012f041948af55d323fc5447230c930e79aa
treeca7338bb06edf5e9f029c2e134238d187be1befd
parenta9ca741d311772efb828c4b4f45e737783a89ca3
runtime: treat SI_TKILL like SI_USER on Linux

On Linux a signal sent using tgkill will have si_code == SI_TKILL,
not SI_USER. Treat the two cases the same. Add a Linux-specific test.

Change the test to use the C pause function rather than sleeping
for a second, as that achieves the same effect.

Change-Id: I2a36646aecabcab9ec42ed9a048b07c2ff0a3987
Reviewed-on: https://go-review.googlesource.com/c/go/+/431255
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
src/runtime/crash_cgo_test.go
src/runtime/os_linux.go
src/runtime/os_linux_be64.go
src/runtime/os_linux_generic.go
src/runtime/os_linux_mips64x.go
src/runtime/os_linux_mipsx.go
src/runtime/os_unix_nonlinux.go [new file with mode: 0644]
src/runtime/signal_unix.go
src/runtime/testdata/testprogcgo/segv.go
src/runtime/testdata/testprogcgo/segv_linux.go [new file with mode: 0644]