fix(seq): handle BrokenPipe like GNU#9471
Merged
sylvestre merged 4 commits intouutils:mainfrom Nov 26, 2025
Merged
Conversation
|
GNU testsuite comparison: |
Contributor
|
can we have a test for this? thanks |
- Ensures seq exits gracefully with code 0 and reports "Broken pipe" error on stderr when stdout pipe is prematurely closed - Validates correct behavior for common scenario where output is piped to commands like head that terminate early
|
GNU testsuite comparison: |
Contributor
Author
|
sylvestre
reviewed
Nov 26, 2025
tests/by-util/test_seq.rs
Outdated
| .set_stdout(Stdio::piped()) | ||
| .run_no_wait(); | ||
|
|
||
| // 出力先が先に閉じられたパイプへ書こうとして Broken pipe を発生させる。 |
Contributor
There was a problem hiding this comment.
please translate to english ;)
- Updated a comment in the test for broken pipe behavior to use English instead of Japanese, enhancing readability for non-Japanese speakers and aligning with project standards. No functional changes to the test logic.
|
GNU testsuite comparison: |
Contributor
is happenning at some PRs and commits after this commit. |
RenjiSann
pushed a commit
to RenjiSann/coreutils
that referenced
this pull request
Nov 28, 2025
* fix(seq): handle BrokenPipe like GNU * test: add Unix-specific test for seq command broken pipe handling - Ensures seq exits gracefully with code 0 and reports "Broken pipe" error on stderr when stdout pipe is prematurely closed - Validates correct behavior for common scenario where output is piped to commands like head that terminate early * refactor(test): translate Japanese comment to English in test_seq.rs - Updated a comment in the test for broken pipe behavior to use English instead of Japanese, enhancing readability for non-Japanese speakers and aligning with project standards. No functional changes to the test logic.
Contributor
Author
The test case in question passes immediately, so the test case needs to be revised. |
martinkunkel2
pushed a commit
to martinkunkel2/coreutils
that referenced
this pull request
Nov 30, 2025
* fix(seq): handle BrokenPipe like GNU * test: add Unix-specific test for seq command broken pipe handling - Ensures seq exits gracefully with code 0 and reports "Broken pipe" error on stderr when stdout pipe is prematurely closed - Validates correct behavior for common scenario where output is piped to commands like head that terminate early * refactor(test): translate Japanese comment to English in test_seq.rs - Updated a comment in the test for broken pipe behavior to use English instead of Japanese, enhancing readability for non-Japanese speakers and aligning with project standards. No functional changes to the test logic.
martinkunkel2
pushed a commit
to martinkunkel2/coreutils
that referenced
this pull request
Nov 30, 2025
* fix(seq): handle BrokenPipe like GNU * test: add Unix-specific test for seq command broken pipe handling - Ensures seq exits gracefully with code 0 and reports "Broken pipe" error on stderr when stdout pipe is prematurely closed - Validates correct behavior for common scenario where output is piped to commands like head that terminate early * refactor(test): translate Japanese comment to English in test_seq.rs - Updated a comment in the test for broken pipe behavior to use English instead of Japanese, enhancing readability for non-Japanese speakers and aligning with project standards. No functional changes to the test logic.
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.
Align the BrokenPipe behavior of the seq program with GNU
We need to align the handling of BrokenPipe errors in GNU test for env with seq.