[trivial] Move SIGUSR1/SIGUSR2 to SIGRT for GC#3617
[trivial] Move SIGUSR1/SIGUSR2 to SIGRT for GC#3617dlang-bot merged 3 commits intodlang:masterfrom rv32ima:move-sigusr-to-sigrt
Conversation
|
Thanks for your pull request and interest in making D better, @hatf0! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please see CONTRIBUTING.md for more information. If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment. Bugzilla references
Testing this PR locallyIf you don't have a local development environment setup, you can use Digger to test this PR: dub run digger -- build "master + druntime#3617" |
thewilsonator
left a comment
There was a problem hiding this comment.
Can this be tested? Also this should definitely have a changelog.
src/core/thread/osthread.d
Outdated
| // thread_resumeHandler does nothing. | ||
| version (Android) thread_setGCSignals(SIGUSR2, SIGUSR1); | ||
| // This hack is no longer needed, as the GC signals now use SIGRTMIN / SIGRTMIN + 1 | ||
| // version (Android) thread_setGCSignals(SIGUSR2, SIGUSR1); |
There was a problem hiding this comment.
I'd say remove this altogether, it'll probably just be confusing and irrelevant in the future.
There was a problem hiding this comment.
This might also silently break applications that rely on SIGRT since they are signals described as application-defined by the POSIX.1-2001. I'm not against it although, since this can significantly improve threads performance, but just take special care of this if needed.
I also suggest to add co-authorship trailing in the commit body based on the Something like this in the end of the commit body: |
|
ping @hatf0 |
What would an acceptable test for this look like? I was thinking along the lines of adding in a signal handler and just ensuring that the signal thrown is SIGRTMIN, but I'm a little stumped on what it'd look like. |
|
I think we can just get away with adding a changelog entry. |
|
@hatf0 please add a changelog entry. |
|
I took the liberty of removing the obsolete Android comment, adding a changelog entry and rebasing. - LLVM's libFuzzer uses SIGUSR1 too: https://github.com/llvm/llvm-project/blob/main/llvm/docs/LibFuzzer.rst#resuming-merge |
I believe this is consensually reasonable and worth changing
|
Once dlang/dmd#14154 is merged, this should be green. |
This is a revival of @9il's issue (Bugzilla Issue 15939, PR #1565), but fixed up / rebased on master.
As well, with this migration to the SIGRT signals, we no longer have to modify the signals for Android, so that line has been nixed.
Here is my rationale for this change (copied from the now-dead PR):
This may result in silent breakage (for developers who already use SIGRTMIN / SIGRTMIN + 1) -- I believe a changelog entry is in order?