GNU bug report logs -
#79079
31.0.50; Piped command output is sometimes lost in Eshell
Previous Next
Full log
Message #80 received at 79079 <at> debbugs.gnu.org (full text, mbox):
On 2025-07-26 21:30, Eli Zaretskii wrote:
> We should try doing what a Posix shell does in that case. A program
> that gets EPIPE generally exits with a failure status (right?),
> anything that happens after that is done by the shell itself.
EPIPE typically means exit, yes, as the process reports the error and
often has nothing better to do than to exit. However, it doesn't always
mean exit. For example, an interactive Emacs does not exit with it gets
EPIPE, as can be demonstrated with this shell command on GNU/Linux:
strace -o /tmp/tr emacs -Q -eval \
"(princ (make-string 10000 ?a) 'external-debugging-output)" 2>&1|:
and then type C-x C-c to exit Emacs.
In this case Emacs painstakingly outputs 10000 'a' bytes, one at a time,
and ignores each of the 10000 EPIPE errors that it gets.
Not sure I know what you mean by "doing what a Posix shell does". Are
you talking about commands that a shell implements directly, like the
shell 'echo' command typically is? If so, those commands are supposed to
do what their standalone counterpart executables do, which typically
means they die due to getting a SIGPIPE signal.
This bug report was last modified 32 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.