aboutsummaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2022-07-19 23:13:24 +0300
committerLasse Collin <lasse.collin@tukaani.org>2022-07-19 23:13:24 +0300
commit923bf96b55e5216a6c8df9d8331934f54784390e (patch)
treee9daec3c804ffe906e425f76ec5e30b227592963 /src/common
parentxzgrep: Make the fix for ZDI-CAN-16587 more robust. (diff)
downloadxz-923bf96b55e5216a6c8df9d8331934f54784390e.tar.xz
xzgrep: Improve error handling, especially signals.
xzgrep wouldn't exit on SIGPIPE or SIGQUIT when it clearly should have. It's quite possible that it's not perfect still but at least it's much better. If multiple exit statuses compete, now it tries to pick the largest of value. Some comments were added. The exit status handling of signals is still broken if the shell uses values larger than 255 in $? to indicate that a process died due to a signal ***and*** their "exit" command doesn't take this into account. This seems to work well with the ksh and yash versions I tried. However, there is a report in gzip/zgrep that OpenSolaris 5.11 (not 5.10) has a problem with "exit" truncating the argument to 8 bits: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=22900#25 Such a bug would break xzgrep but I didn't add a workaround at least for now. 5.11 is old and I don't know if the problem exists in modern descendants, or if the problem exists in other ksh implementations in use.
Diffstat (limited to 'src/common')
0 files changed, 0 insertions, 0 deletions