Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
runtime: handle signal 34 for musl setgid
It has been observed that setgid hangs when using cgo with musl. This fix ensures that signal 34 gets handled in an appropriate way, like signal 33 when using glibc. Fixes #39343 Change-Id: I89565663e2c361f62cbccfe80aaedf290bd58d57 Reviewed-on: https://go-review.googlesource.com/c/go/+/236518 Run-TryBot: Tobias Klauser <[email protected]> TryBot-Result: Go Bot <[email protected]> Trust: Tobias Klauser <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]>
- Loading branch information
49b017f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This commit was an incorrect fix. Use of kernel-level signal 34 here is not an interface contract of musl. It's a runtime-variable property determined by
SIGRTMIN
/SIGRTMAX
. The underlying issue seems to be use of raw syscalls or passing raw self-generatedsigset_t
values rather than using the libc signal API.49b017f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We use Gerrit for code review, so very few people see comments made on GitHub commits. The place to make this comment is https://golang.org/cl/236518. Thanks.
Note that Go on GNU/Linux explicitly does not use the libc API.
49b017f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
musl is not GNU/Linux. :-)