You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
env: --default-signal, --ignore-signal and --block-signal are applied in a fixed order, not in the order given #15187
uutils applies --default-signal first, then --ignore-signal, then --block-signal, whatever their order on the command line, so the first and the last two commands leave INT ignored or blocked (INT (2): IGNORE, INT (2): BLOCK, INT (2): IGNORE). GNU 9.12 and uutils main at a5bc606; the listing itself is #15185.
Hi, I've looked into this . The issue is that we are storing each flag separately and then constructing independent SignalRequests instances for each of them. Then, here we use apply_signal_action to apply them in a fixed order (default, ignore, block)
To fix this, I was thinking of using a single ordered sequence of SignalOperations. Then during argument parsing, clap::ArgMatches::indices_of() can be used to retain each option's command-line occurrence index. The operations can then be sorted by that index and applied sequentially in run_env. If this is acceptable, I could go ahead and submit a PR
Activity
AnandajithS commentedon Oct 8, 2026
Hi, I've looked into this . The issue is that we are storing each flag separately and then constructing independent
SignalRequestsinstances for each of them. Then, here we useapply_signal_actionto apply them in a fixed order (default, ignore, block)To fix this, I was thinking of using a single ordered sequence of
SignalOperations. Then during argument parsing,clap::ArgMatches::indices_of()can be used to retain each option's command-line occurrence index. The operations can then be sorted by that index and applied sequentially inrun_env. If this is acceptable, I could go ahead and submit a PRNdekoCode commentedon Oct 9, 2026
Looks right to me. #13006 rewrites a good part of the signal handling in env.rs and test_env.rs, worth checking it does not collide before you start.