Debian Bug report logs - #998207
lz4: redirecting stdout to /dev/null changes program behaviour

version graph

Package: lz4; Maintainer for lz4 is Nobuhiro Iwamatsu <[email protected]>; Source for lz4 is src:lz4 (PTS, buildd, popcon).

Reported by: Witold Baryluk <[email protected]>

Date: Mon, 1 Nov 2021 00:06:01 UTC

Severity: important

Found in version lz4/1.9.3-2

Reply or subscribe to this bug.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to [email protected], [email protected], Nobuhiro Iwamatsu <[email protected]>:
Bug#998207; Package lz4. (Mon, 01 Nov 2021 00:06:03 GMT) (full text, mbox, link).


Acknowledgement sent to Witold Baryluk <[email protected]>:
New Bug report received and forwarded. Copy sent to [email protected], Nobuhiro Iwamatsu <[email protected]>. (Mon, 01 Nov 2021 00:06:03 GMT) (full text, mbox, link).


Message #5 received at [email protected] (full text, mbox, reply):

From: Witold Baryluk <[email protected]>
To: Debian Bug Tracking System <[email protected]>
Subject: lz4: redirecting stdout to /dev/null changes program behaviour
Date: Mon, 01 Nov 2021 00:04:05 +0000
Package: lz4
Version: 1.9.3-2
Severity: important
X-Debbugs-Cc: [email protected]

Running

lz4 --quiet --keep input.file.txt

will produce input.file.txt.lz4

lz4 --quiet --keep input.file.txt >/dev/null

will instead print this on stderr:

Warning : using stdout as default output. Do not rely on this behavior: use explicit `-c` instead ! 

and produces no compressed file.

This is behaviour different than all compression tools (gzip, bzip2,
lzma, xz, brotli, arj, 7z, zip, cab, snappy, zstd, ...).

Stdout should only be used when `-c` is expliclty passed, or the input is
the stdout (i.e. foo | lz4 | ...).

Regards,
Witold


-- System Information:
Debian Release: bookworm/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.15.0-rc7 (SMP w/32 CPU threads; PREEMPT)
Kernel taint flags: TAINT_UNSIGNED_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages lz4 depends on:
ii  libc6     2.32-4
ii  liblz4-1  1.9.3-2

lz4 recommends no packages.

lz4 suggests no packages.

-- no debconf information



Send a report that this bug log contains spam.


Debian bug tracking system administrator <[email protected]>. Last modified: Thu May 15 19:30:04 2025; Machine Name: bembo

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU General Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.