]> Cypherpunks repositories - gostls13.git/commit
runtime: treat SI_TKILL like SI_USER on Linux
authorIan Lance Taylor <iant@golang.org>
Tue, 20 Sep 2022 19:24:07 +0000 (12:24 -0700)
committerGopher Robot <gobot@golang.org>
Wed, 21 Sep 2022 01:56:24 +0000 (01:56 +0000)
commitd11c58eedbee29b4912dd50508b36ad15ebb739e
tree9306af01cc8b15d02076420e86dc8db063712526
parentfec83c8a7d1a3bb5f63366acd55f83ed8782bff0
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.

This is a roll forward of CL 431255 which was rolled back in CL 431715.
This new version skips flaky tests on more systems, and marks a new method
nosplit.

Change-Id: Ibf2d3e6fc43d63d0a71afa8fcca6a11fda03f291
Reviewed-on: https://go-review.googlesource.com/c/go/+/432136
Auto-Submit: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
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]