1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2026-01-20 04:01:06 +00:00
uutils-coreutils/src
Kevin Burke 7fc1b16115
sort: fix panic on write to closed pipe
If the output of sort is piped to another program that closes the file
descriptor, sort currently panics. The GNU coreutils is able to handle
this case.

Replacing panic with crash_if_err reports the closed pipe and exits
with a return code, which seems like the correct behavior. Tested on
my Mac and the panic disappears.

Add a test which pipes data to sort - it won't protect against this
specific regression, but it increases the test coverage, at least.

Fixes #1608.
2020-10-21 16:55:10 -07:00
..
bin refactor/polish ~ fix cargo clippy complaint (stable_sort_primitive) 2020-10-10 20:35:35 -05:00
uu sort: fix panic on write to closed pipe 2020-10-21 16:55:10 -07:00