(Forwarded from Launchpad Bug #2133156)
Summary
When sort's output is passed to a pipe that is closed mid-write (as head -n 0 does), the error write failed: 'standard output': Broken pipe is generated.
Reproduce
- Pipe the output of a
sort invocation to head -n 0.
echo 1 | sort | head -n 0
Output:
sort: write failed: 'standard output': Broken pipe
- Verify with
gnusort.
echo 1 | gnusort | head -n 0
Output:
System
- OS release: Ubuntu 26.04 (Development branch)
- uutils coreutils version: 0.5.0 (built from main commit: 1d6bd99)
(Forwarded from Launchpad Bug #2133156)
Summary
When sort's output is passed to a pipe that is closed mid-write (as
head -n 0does), the errorwrite failed: 'standard output': Broken pipeis generated.Reproduce
sortinvocation tohead -n 0.Output:
sort: write failed: 'standard output': Broken pipegnusort.Output:
# Empty, successSystem