]> git.ipfire.org Git - thirdparty/xz.git/commit
Windows: Avoid an error message on broken pipe
authorLasse Collin <lasse.collin@tukaani.org>
Tue, 28 Jan 2025 14:28:18 +0000 (16:28 +0200)
committerLasse Collin <lasse.collin@tukaani.org>
Wed, 29 Jan 2025 18:59:44 +0000 (20:59 +0200)
commit4d7e7c9d94f7a5ad4931a5bbd6ed9d00173fa1ab
tree00cbfafb572936c95ba8a6cf91d3a80d97e16b45
parent95b638480aa8203e547c709c651f421c22db1718
Windows: Avoid an error message on broken pipe

Also make xz not process more input files after a broken pipe has
been detected. This matches the behavior on POSIX. If all files
are being written to standard output, trying with the next file is
pointless when it's known that standard output won't accept more data.

xzdec already stopped after the first error. It does so with all
errors, so it differs from xz:

    $ xz -dc not_found_1 not_found_2
    xz: not_found_1: No such file or directory
    xz: not_found_2: No such file or directory

    $ xzdec not_found_1 not_found_2
    xzdec: not_found_1: No such file or directory

Reported-by: Vincent Torri
src/xz/file_io.c
src/xzdec/xzdec.c