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

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: coreutils; Reported by: lilydjwg <lilydjwg@HIDDEN>; merged with #76255, #76257; dated Thu, 13 Feb 2025 08:01:02 UTC; Maintainer for coreutils is bug-coreutils@HIDDEN.
Merged 76255 76256 76257. Request was from Paul Eggert <eggert@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 13 Feb 2025 08:00:18 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Feb 13 03:00:18 2025
Received: from localhost ([127.0.0.1]:40078 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tiU8w-0000rB-1e
	for submit <at> debbugs.gnu.org; Thu, 13 Feb 2025 03:00:18 -0500
Received: from lists.gnu.org ([2001:470:142::17]:59166)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <lilydjwg@HIDDEN>)
 id 1tiTQr-0003sh-Qq
 for submit <at> debbugs.gnu.org; Thu, 13 Feb 2025 02:14:46 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <lilydjwg@HIDDEN>)
 id 1tiTQk-0007RQ-BF
 for bug-coreutils@HIDDEN; Thu, 13 Feb 2025 02:14:38 -0500
Received: from mail-pl1-x62f.google.com ([2607:f8b0:4864:20::62f])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <lilydjwg@HIDDEN>)
 id 1tiTQi-0005j2-G2
 for bug-coreutils@HIDDEN; Thu, 13 Feb 2025 02:14:37 -0500
Received: by mail-pl1-x62f.google.com with SMTP id
 d9443c01a7336-21f7f03d856so9371515ad.1
 for <bug-coreutils@HIDDEN>; Wed, 12 Feb 2025 23:14:35 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1739430874; x=1740035674; darn=gnu.org;
 h=disposition-notification-to:in-reply-to:content-disposition
 :mime-version:references:message-id:subject:to:from:date:from:to:cc
 :subject:date:message-id:reply-to;
 bh=aH4xQ/FzVAE6y8P7PpcuxzXSez+DUgNNj/u6PSmTOkI=;
 b=G/rpNuaklXUvA+vxFH2sOYYNxwCS5qNk7PKVUmwm55vzbTMiFVIgoDYkgm9J1qQPye
 daHd6nMCNdEp6BZ8Q7j432zQmJ0cRPHM+Dy1CyqzpXirQ29Wvq9acXZenuh4qGO2isLP
 qPk5RHC9Hjobu9Z4b+NJ09TGzu3/0HWMy6hdJjQmcI5y42F/5L0wWlFTCPeXjrvSWcM9
 tYFlhiQ1E3IYtDJPHcTrks+btTYMtmk8eP0U7v26amutszInbXE+9gVHr4GySJFH0zR+
 4MMbuzVO/x4EWDJPwGg1Bm8TfdhTWKQLEHYjQh1N8kriuS4ys3Gl0vZlr6HtwiBxFO7L
 SnZQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1739430874; x=1740035674;
 h=disposition-notification-to:in-reply-to:content-disposition
 :mime-version:references:message-id:subject:to:from:date
 :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
 bh=aH4xQ/FzVAE6y8P7PpcuxzXSez+DUgNNj/u6PSmTOkI=;
 b=tt8N3oaCzkp1V2DdzpnU+aqPc+0YJTYe/TznO+JUroFJHuLLFcDGrQkhAchStfQaZX
 XqFbBud8OCRIhN4EwqgANPKDNH8hgKwK7i5i5/EM5M+JZ9OQKeQZWI1BLsoZW2wDHqCO
 smA8NeLpN5GuCJmcw2K0hvgI96fAMa5XKrXZ1RItwnyhsL0Nn2kK3+SUvk1/5AEnMr5a
 XZhQwnGhjlgSpLVnxshSUVoiYhlyiQBDcOofs2UxLpyWXoLNuvPD/AxaB5uHk4OVi4Ta
 /45lbmDC7zulw2SXWny/8bWzmMx0upmkQouZ8LCRueG8IiAN3xlvhy/+cRY10GeY1u9G
 cnLw==
X-Gm-Message-State: AOJu0Yz+e3ryibn0Xaea9MyY/uidugU4vTlzqMEyTmiZ7w+CVcFpv3kq
 zr+2K5GEgzgn0iBKdDl2aIQOuxnaaoPlDxl8tAsW88caKLl8H/H/nlmH6CFqJm4+Yg==
X-Gm-Gg: ASbGncvo3weQx0LYMHzaa+0h0ngd1yR67+nLXgy0YTAWfi4BXKTJeVSHtGuP0izATsX
 mnk8M6O8ebT+qe/tPkmpkl/PY8mT4yWul8ahdNLpjF3sz2pqBxPLS3LUUnyCFVpJsnHogDZG6zF
 Fs9TPL486jb/g+PpvaQcUPfcT+lwXLrX9Tw+YC8AGwTJr2qyG3gtI2hIRaUj3J5mOF/nu6ipbp6
 yFkVyUMeKaGtPO6luvgbjWqmzkFsz3qEUhz5pmjAZKPRo+Nx2S7nZrnFb5VQbwMI7kX4NSONS1V
 0GTPNN/WFtG6XA==
X-Google-Smtp-Source: AGHT+IFdafbvM/KVD7l5NHCtfBfnKF5bY6zFhPd5Q85wEKdYJRw0FRZu2ijLXmmOaggvkJ76kIxNjg==
X-Received: by 2002:a17:903:32d2:b0:215:7421:262 with SMTP id
 d9443c01a7336-220d1ed415dmr37616145ad.12.1739430873601; 
 Wed, 12 Feb 2025 23:14:33 -0800 (PST)
Received: from localhost ([2a0c:b641:69c:caa0:fd64:9d13:cc80:b82e])
 by smtp.gmail.com with UTF8SMTPSA id
 d9443c01a7336-220d5349510sm6129325ad.13.2025.02.12.23.14.31
 for <bug-coreutils@HIDDEN>
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Wed, 12 Feb 2025 23:14:32 -0800 (PST)
Date: Thu, 13 Feb 2025 15:13:58 +0800
From: lilydjwg <lilydjwg@HIDDEN>
To: bug-coreutils@HIDDEN
Subject: Re: cat: error without arguments
Message-ID: <Z62btiiauNHTZt-4@HIDDEN>
References: <Z62VE_yO1-a1Etna@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <Z62VE_yO1-a1Etna@HIDDEN>
X-Mailer: Mutt 2.2.13 (00d56288) (2024-03-09)
Received-SPF: pass client-ip=2607:f8b0:4864:20::62f;
 envelope-from=lilydjwg@HIDDEN; helo=mail-pl1-x62f.google.com
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001,
 GB_FREEMAIL_DISPTO=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Thu, 13 Feb 2025 03:00:16 -0500
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)

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




Acknowledgement sent to lilydjwg <lilydjwg@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-coreutils@HIDDEN. Full text available.
Report forwarded to bug-coreutils@HIDDEN:
bug#76256; Package coreutils. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Fri, 14 Feb 2025 21:15:02 UTC

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