From: Eli Zaretskii <eliz@gnu.org>
To: Jim Porter <jporterbugs@gmail.com>
Cc: 54062@debbugs.gnu.org
Subject: bug#54062: 29.0.50; [PATCH] Eshell should inform processes when a pipe is broken
Date: Sat, 19 Feb 2022 10:35:33 +0200 [thread overview]
Message-ID: <83mtinz222.fsf@gnu.org> (raw)
In-Reply-To: <7da3e8b2-7400-dca6-6d92-0a60e3d9c215@gmail.com> (message from Jim Porter on Fri, 18 Feb 2022 20:20:10 -0800)
> From: Jim Porter <jporterbugs@gmail.com>
> Date: Fri, 18 Feb 2022 20:20:10 -0800
>
> Consider the following shell command:
>
> yes | sh -c 'read NAME'
>
> Ordinarily, you'd expect that `sh' reads a single "y", exits, and then
> the next time `yes' tries to write, it finds that the pipe was broken.
> However, that's not what happens in Eshell. Running the above and then
> calling `M-x list-processes' will show that `yes' is still running.
>
> Attached is a patch (with a test) to fix this by telling Eshell to
> signal SIGPIPE at the appropriate time.
SIGPIPE isn't supported on MS-Windows, so I think we should have a
fallback there for platforms that don't support SIGPIPE.
Thanks.
next prev parent reply other threads:[~2022-02-19 8:35 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-19 4:20 bug#54062: 29.0.50; [PATCH] Eshell should inform processes when a pipe is broken Jim Porter
2022-02-19 8:35 ` Eli Zaretskii [this message]
2022-02-19 20:02 ` Jim Porter
2022-02-19 20:19 ` Eli Zaretskii
2022-02-19 21:18 ` Jim Porter
2022-02-20 7:27 ` Eli Zaretskii
2022-02-20 20:17 ` Jim Porter
2022-02-21 17:15 ` Eli Zaretskii
2022-02-21 17:39 ` Lars Ingebrigtsen
2022-02-21 18:31 ` Eli Zaretskii
2022-02-21 20:37 ` Jim Porter
2022-02-22 13:09 ` Eli Zaretskii
2022-02-22 16:49 ` Jim Porter
2022-02-23 12:14 ` Lars Ingebrigtsen
2022-02-24 5:20 ` Jim Porter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83mtinz222.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=54062@debbugs.gnu.org \
--cc=jporterbugs@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).