From: Sebastian Andrzej Siewior <sebast...@breakpoint.cc> The `cmp' command will return early if a difference is found while the shell script is still invoking the decompressor which writes into the closed FD. This results in SIGPIPE / exit code 141. By ignoring SIGPIPE the real return code from `cmp' is observed which is `1' and xzdiff exits with `1'. Without ignoring SIGPIPE the exitcode 141 is observed and xzdiff returns with `2'.
Reported to Debian BTS as #844770. Change suggested by Étienne Mollierö. BTS: https://bugs.debian.org/844770 Signed-off-by: Sebastian Andrzej Siewior <sebast...@breakpoint.cc> --- src/scripts/xzdiff.in | 1 + 1 file changed, 1 insertion(+) diff --git a/src/scripts/xzdiff.in b/src/scripts/xzdiff.in index eb7825c1dfba9..d343a889e0e52 100644 --- a/src/scripts/xzdiff.in +++ b/src/scripts/xzdiff.in @@ -1,4 +1,5 @@ #!@POSIX_SHELL@ +trap '' PIPE # Copyright (C) 1998, 2002, 2006, 2007 Free Software Foundation # Copyright (C) 1993 Jean-loup Gailly -- 2.29.2