GNU bug report logs - #76256
cat: error without arguments

Previous Next

Package: coreutils;

Reported by: lilydjwg <lilydjwg <at> gmail.com>

Date: Thu, 13 Feb 2025 08:01:02 UTC

Severity: normal

Merged with 76255, 76257

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 76256 in the body.
You can then email your comments to 76256 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

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


Report forwarded to bug-coreutils <at> gnu.org:
bug#76256; Package coreutils. (Thu, 13 Feb 2025 08:01:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to lilydjwg <lilydjwg <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-coreutils <at> gnu.org. (Thu, 13 Feb 2025 08:01:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: lilydjwg <lilydjwg <at> gmail.com>
To: bug-coreutils <at> gnu.org
Subject: Re: cat: error without arguments
Date: Thu, 13 Feb 2025 15:13:58 +0800
On Thu, Feb 13, 2025 at 02:45:39PM +0800, lilydjwg wrote:
> In the past I can run `cat` without any arguments and it prints
> whatever I type at the terminal. However since 9.6, `cat` reports the
> following error:
> 
> cat: -: input file is output file

Ah, I find it's not always reproducible, and a strace reveals that the
stdout flags are different:

Erroring cat (in my existing shell session):

fcntl(1</dev/pts/5<char 136:5>>, F_GETFL) = 0x402 (flags O_RDWR|O_APPEND)

Working cat (in a new shell session):

fcntl(1</dev/pts/11<char 136:11>>, F_GETFL) = 0x2 (flags O_RDWR)

I'm using zsh, and this issue starts to occur after I do a tab
completion (in my case, type "cat" and then tab). Other users report
that some fish completion can also cause this issue.

The terminal in use itself seems to not matter. I'm using GNOME
Terminal, inside and outside tmux.

-- 
Best regards,
lilydjwg




Merged 76255 76256 76257. Request was from Paul Eggert <eggert <at> cs.ucla.edu> to control <at> debbugs.gnu.org. (Fri, 14 Feb 2025 21:06:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 15 Mar 2025 11:24:06 GMT) Full text and rfc822 format available.

bug unarchived. Request was from Pádraig Brady <P <at> draigBrady.com> to control <at> debbugs.gnu.org. (Tue, 01 Jul 2025 22:42:03 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 30 Jul 2025 11:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 15 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.