Skip to content

tail: fix pipe-f test by detecting broken stdout pipe#10156

Merged
sylvestre merged 1 commit intouutils:mainfrom
ChrisDryden:tail-pipe-fix
Jan 10, 2026
Merged

tail: fix pipe-f test by detecting broken stdout pipe#10156
sylvestre merged 1 commit intouutils:mainfrom
ChrisDryden:tail-pipe-fix

Conversation

@ChrisDryden
Copy link
Collaborator

There are two high level changes in this PR, the first is that when timing out, validating that stdout is still valid. This was implemented by moving the function that validates stdout from tee to signal and then using it in the tail utility.

The second change is harder to wrap my head around, its removing stdin from the observing group. Which was implemented like this:

observer.add_stdin(input.display_name.as_str(), Some(Box::new(reader)), true)?;

When I was doing research on why one would follow stdin, all of the information I could find said that stdin cannot be meaningfully followed and that no new information could arrive after EOF, so that removing this would solve the issue of continuously waiting on stdin instead of waiting forever.

Maybe someone could explain to me why we were doing this, but as far as I can tell it is not required and has the side effect of causing it to hang even when the stdin is closed.

@github-actions
Copy link

GNU testsuite comparison:

Skipping an intermittent issue tests/timeout/timeout (passes in this run but fails in the 'main' branch)
Congrats! The gnu test tests/tail/pipe-f is no longer failing!

@sylvestre sylvestre merged commit 98e0b31 into uutils:main Jan 10, 2026
132 checks passed
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