Skip to content

Conversation

@mattsu2020
Copy link
Contributor

Key Improvements

Increased GNU coreutils compatibility by aligning behavior with upstream implementations and addressing differences in edge-case handling.
Fixed the env-signal-handler.sh test, ensuring correct signal propagation and consistent behavior across platforms.
Added minor adjustments to internal logic to better emulate GNU semantics and reduce divergence.

Why This Matters

Improving compatibility helps maintain predictable behavior for users migrating from GNU coreutils. Successfully passing the env-signal-handler.sh test strengthens signal-handling reliability and contributes to overall test suite stability.

mattsu2020 and others added 12 commits November 10, 2025 20:55
- Add default-signal, block-signal, and list-signal-handling options
- Support specifying, tracking, and reporting signal handling changes
- Update en-US and fr-FR locales to document new signal options
Added 'Sigmask' to ignore list in env.rs and 'sighandler' in test_env.rs to suppress false positives from spell-checker on legitimate specialized words.
Remove explicit match on write result to handle BrokenPipe errors, simplifying to a direct
map_err_context call. This assumes uucore's higher-level error handling will appropriately
ignore BrokenPipe signals for command-line tools, reducing code duplication and improving
consistency across uutils commands.
Modify the error handling in uumain to specifically catch BrokenPipe errors, display the error message via uucore::show_error!, but return Ok(()) instead of propagating the error. This ensures seq exits successfully on broken pipes, matching the behavior of GNU seq.
@mattsu2020 mattsu2020 marked this pull request as draft November 24, 2025 01:23
@github-actions
Copy link

GNU testsuite comparison:

Skip an intermittent issue tests/misc/tee (fails in this run but passes in the 'main' branch)
Skip an intermittent issue tests/tail/overlay-headers (fails in this run but passes in the 'main' branch)
Congrats! The gnu test tests/env/env-signal-handler is no longer failing!

Previously, the signal handling functions (`apply_default_signal`, `apply_ignore_signal`, and `apply_block_signal`) would return an error if `signal_from_value` got an invalid signal. This change modifies the code to skip invalid signals and continue processing, aligning with GNU env's behavior of ignoring undefined signals on certain platforms where `ALL_SIGNALS` may include invalid values. This improves compatibility and robustness.
@github-actions
Copy link

GNU testsuite comparison:

Skip an intermittent issue tests/tail/overlay-headers (fails in this run but passes in the 'main' branch)
Congrats! The gnu test tests/env/env-signal-handler is no longer failing!

@mattsu2020 mattsu2020 marked this pull request as ready for review November 24, 2025 02:47
@ChrisDryden
Copy link
Contributor

Any chance theres a clean way to split the compatibility fixes from the test fixes? Its just quite a big CR to review and its hard to match the tests to the code changes. Maybe at least splitting the changes in the other bins?

@mattsu2020
Copy link
Contributor Author

mattsu2020 commented Nov 24, 2025

Any chance theres a clean way to split the compatibility fixes from the test fixes? Its just quite a big CR to review and its hard to match the tests to the code changes. Maybe at least splitting the changes in the other bins?

separate this PR
seq only
#9471

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants