uucore: handle SIGRTMIN+N and SIGRTMAX-N notation#12149
Open
enr0n wants to merge 3 commits intouutils:mainfrom
Open
uucore: handle SIGRTMIN+N and SIGRTMAX-N notation#12149enr0n wants to merge 3 commits intouutils:mainfrom
enr0n wants to merge 3 commits intouutils:mainfrom
Conversation
|
GNU testsuite comparison: |
Contributor
|
some jobs are failing |
Author
|
This is actually not enough to fix #11151 yet. The parsing is fixed, but the signals are not actually blocked, because |
On Linux, signals in the range SIGRTMIN..SIGRTMAX are valid in addition to SIGRTMIN and SIGRTMAX themselves. The notation SIGRTMIN+N and SIGRTMAX-N is used to reference signals in that range. Adapt signal helpers to understand this.
The nix::sys::signal::Signal enum type does not cover real-time signals. In the current env code, this means that trying to block e.g. SIGRTMIN+7 is silently ignored, apply_signal_action() silently drops signals that cannot be represented as that enum. However, the enum cannot simply be extended to represent the real-time signals, because SIGRTMIN and SIGRTMAX cannot be considered constants. To workaround this, do not use the Signal enum type, and use libc where needed instead of the wrappers. Fixes: uutils#11151
Right now it is not possible to send real-time signals using kill because the underlying nix::sys::signal code does not support real-time signals. Workaround this by using libc directly. With this, the "EXIT" workaround can be dropped, because we no longer need to convert to nix::sys::signal::Signal.
Author
|
With the two additional commits, env and kill should both properly support real-time signals. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On Linux, signals in the range SIGRTMIN..SIGRTMAX are valid in addition to SIGRTMIN and SIGRTMAX themselves. The notation SIGRTMIN+N and SIGRTMAX-N is used to reference signals in that range.
Adapt signal helpers to understand this.
Fixes: #11151