Repository navigation
env: list the state of the signals, not the actions taken - #15186
Merged
Merged
Conversation
sylvestre
reviewed
Oct 8, 2026
sylvestre
reviewed
Oct 8, 2026
sylvestre
reviewed
Oct 8, 2026
sylvestre
reviewed
Oct 8, 2026
sylvestre
reviewed
Oct 8, 2026
NdekoCode
force-pushed
the
env-list-signal-handling
branch
from
October 20, 2026 19:33
c7ed1cb to
4fd4639
Compare
Contributor
Author
|
@sylvestre rebased on main, the tests use path() now. |
46 of 74 tasks
sylvestre
force-pushed
the
env-list-signal-handling
branch
from
November 3, 2026 22:36
4fd4639 to
bac466f
Compare
--list-signal-handling printed the actions env had been asked for, so a signal set to its default was listed as DEFAULT, an inherited ignore was not listed at all, and a signal both blocked and ignored showed one state. GNU lists every signal that is not at its default once the options are applied, inherited or not, as BLOCK, IGNORE or both, with the number padded to two characters. Query the disposition and the mask of each signal and print those. The log of actions only served the listing and goes away.
Nothing reads the explicit flag of for_each_signal any more, so drop it. The last signal to look at is signal_number_upper_bound(), and the state of a signal is a match on (blocked, ignored) rather than a joined Vec. The inherited-state test ignored USR1 in the test process itself, which all the tests share (test_tail sends USR1 to its children): ignore it in an outer env and list from an inner one instead.
sylvestre
force-pushed
the
env-list-signal-handling
branch
from
November 4, 2026 07:05
bac466f to
a9013f0
Compare
Contributor
|
Thanks for your PR |
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.
--list-signal-handlingprinted the actions env had been asked for, so a signal set to its default was listed asDEFAULT, an ignore inherited from the parent was not listed at all, and a signal both blocked and ignored showed a single state. GNU 9.12 lists every signal that is not at its default once the options are applied, inherited or not, asBLOCK,IGNOREorBLOCK,IGNORE, with the number padded to two characters.env now queries the disposition and the mask of each signal and prints those; the log of actions only served the listing and goes away. The tests check a line each rather than the whole output, since other tests in the same process change its dispositions while they run and env lists what it inherits. Checked against GNU 9.12; the env suite passes. Part of what
env/env-signal-handler.shfrom #14705 checks.Closes #15185.