]> git.ipfire.org Git - thirdparty/coreutils.git/commit
sort: fix silent exit upon SIGPIPE from --compress-program
authorPádraig Brady <P@draigBrady.com>
Tue, 28 Oct 2025 19:30:08 +0000 (19:30 +0000)
committerPádraig Brady <P@draigBrady.com>
Wed, 29 Oct 2025 19:03:23 +0000 (19:03 +0000)
commitb294aff3fe6c8ebeda02b8c77877ba618474de41
tree0b511881d71ce69f229d09c165f98072f1a98397
parent7bd932c34e76cdb146c72d47c23c51c7065a3b3d
sort: fix silent exit upon SIGPIPE from --compress-program

* src/sort.c (main): Ignore SIGPIPE so we've more control over
how we handle for stdout and compression programs.
(sort_die): Handle EPIPE from stdout and mimic a standard SIGPIPE,
otherwise reverting to a standard exit(SORT_FAILURE);
* tests/sort/sort-compress-proc.sh: Add a test case.
* NEWS: Mention the bug fix.
NEWS
src/sort.c
tests/sort/sort-compress-proc.sh