1
0
Fork 0
mirror of https://git.tukaani.org/xz.git synced 2024-04-04 12:36:23 +02:00
xz-archive/src/scripts
Lasse Collin 194029ffaf Scripts: Fix exit status of xzdiff/xzcmp.
This is a minor fix since this affects only the situation when
the files differ and the exit status is something else than 0.
In such case there could be SIGPIPE from a decompression tool
and that would result in exit status of 2 from xzdiff/xzcmp
while the correct behavior would be to return 1 or whatever
else diff or cmp may have returned.

This commit omits the -q option from xz/gzip/bzip2/lzop arguments.
I'm not sure why the -q was used in the first place, perhaps it
hides warnings in some situation that I cannot see at the moment.
Hopefully the removal won't introduce a new bug.

With gzip the -q option was harmful because it made gzip return 2
instead of >= 128 with SIGPIPE. Ignoring exit status 2 (warning
from gzip) isn't practical because bzip2 uses exit status 2 to
indicate corrupt input file. It's better if SIGPIPE results in
exit status >= 128.

With bzip2 the removal of -q seems to be good because with -q
it prints nothing if input is corrupt. The other tools aren't
silent in this situation even with -q. On the other hand, if
zstd support is added, it will need -q since otherwise it's
noisy in normal situations.

Thanks to Étienne Mollier and Sebastian Andrzej Siewior.
2021-01-11 22:58:58 +02:00
..
Makefile.am Build: Add support for translated man pages using po4a. 2020-02-07 15:32:21 +02:00
xzdiff.1 Scripts: Add lzop (.lzo) support to xzdiff and xzgrep. 2011-03-19 13:08:22 +02:00
xzdiff.in Scripts: Fix exit status of xzdiff/xzcmp. 2021-01-11 22:58:58 +02:00
xzgrep.1 Scripts: Add zstd support to xzgrep. 2020-12-05 22:39:03 +02:00
xzgrep.in Scripts: Add zstd support to xzgrep. 2020-12-05 22:39:03 +02:00
xzless.1 Major man page updates. 2010-09-27 23:29:34 +03:00
xzless.in Scripts: Put /usr/xpg4/bin to the beginning of PATH on Solaris. 2019-09-24 23:02:40 +03:00
xzmore.1 Man pages: Use similar syntax for synopsis as in xz. 2013-06-30 18:02:27 +03:00
xzmore.in Scripts: Put /usr/xpg4/bin to the beginning of PATH on Solaris. 2019-09-24 23:02:40 +03:00