Skip to content

Conversation

tgrez
Copy link
Contributor

@tgrez tgrez commented Jul 10, 2025

Fixes #4965.

The original issue can be reproduced with:
Edit: I misunderstood #4965, but it's related.

The incorrect handling of broken pipe can be reproduced with:

$ echo "oneline" > file
$ tail file | false
$
$ coreutils tail file | false
tail: Broken pipe
$

Copy link

GNU testsuite comparison:

Skipping an intermittent issue tests/timeout/timeout (passes in this run but fails in the 'main' branch)

Comment on lines +698 to +702
assert!(
self.stderr.is_empty(),
"Expected stderr to be empty, but it's:\n{}",
self.stderr_str()
);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice little change :)

@cakebaker cakebaker merged commit 685969e into uutils:main Jul 10, 2025
76 checks passed
@cakebaker
Copy link
Contributor

Thanks!

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.

tail does not exit when pipe is broken
2 participants