cksum: get rid of print! and println! to avoid panicking on write errors#12099
Conversation
|
GNU testsuite comparison: |
355ddc8 to
ad9b814
Compare
Merging this PR will degrade performance by 16.98%
Performance Changes
Comparing Footnotes
|
ad9b814 to
c73b690
Compare
|
Note that GNU seems to inconsistenly handle whether it shows the I assume this is because the way the error is displayed is different between the writes and the final flush that happens in $ uu_cksum /dev/null > /dev/full
cksum: write error: No space left on device
$ gnu_cksum /dev/null > /dev/full
cksum: write error # <-- GNU most probably prints the error differently here
$ uu_cksum /dev/null > /dev/full -z
cksum: write error: No space left on device
$ gnu_cksum /dev/null > /dev/full -z
cksum: write error: No space left on device |
maybe you should report that to the coreutils/coreutils repo |
Good work with the macros, I'd been wondering whether it was possible to avoid that flush. |
c73b690 to
104bdfe
Compare
Done ! coreutils/coreutils#258
Thanks :) |
7e4e632 to
d836b22
Compare
... To avoid duplicate error message when the util already does the job
Adds a Linux-only regression test that verifies cksum exits with code 1 (rather than panicking) when stdout is /dev/full. Refs uutils#10947 (fixed by uutils#12099).
Fix for #10947
Also needed to do some shenanigans in the
uucore::binmacro to avoid having an extra flush failing.