unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Jim Porter <jporterbugs@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>, Lars Ingebrigtsen <larsi@gnus.org>
Cc: 54136@debbugs.gnu.org
Subject: bug#54136: 29.0.50; Eshell emits extra prompts when killing processes in some cases
Date: Thu, 24 Feb 2022 10:55:48 -0800	[thread overview]
Message-ID: <7f820c27-a58c-3b2b-3132-a57e2a25ea96@gmail.com> (raw)
In-Reply-To: <834k4osf07.fsf@gnu.org>

On 2/24/2022 3:03 AM, Eli Zaretskii wrote:
>> From: Lars Ingebrigtsen <larsi@gnus.org>
>> Date: Thu, 24 Feb 2022 10:35:32 +0100
>> Cc: 54136@debbugs.gnu.org
>>
>> Thanks; pushed to Emacs 29.
> 
> The new tests fail on MS-Windows.  Does the patch below look right?

Thanks, and sorry for the breakage.

> I'm quite sure about the "sh" vs "sh.exe" part, but what about the
> "killed" vs "interrupt" part? any idea why this happens on MS-Windows?

I think this makes sense. POSIX-style signal handling on MS Windows is 
only approximate, so I'm not surprised it produces some surprising 
results like that. Maybe it's possible to pass the signal code through 
the process exit status more accurately, but that's probably only a 
partial solution at best (due to the API differences), and at worst 
could break Emacs's subprocess handling for MS Windows in subtle ways.

Another solution would be to replace the call to `eshell-kill-process' 
in `esh-proc-test/kill-pipeline' with `eshell-interrupt-process'. Then 
the exit status should be "interrupt\n" on all platforms. I've verified 
that that works ok on GNU/Linux, but it's possible that it runs into 
some other issue on MS Windows.

This is sort of just working around the issue, but I also think there's 
an argument that `eshell-interrupt-process' is the more "natural" 
function to call, since it corresponds to a user hitting ^C in the shell 
(or C-c C-c in Eshell).





  reply	other threads:[~2022-02-24 18:55 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-24  5:11 bug#54136: 29.0.50; Eshell emits extra prompts when killing processes in some cases Jim Porter
2022-02-24  5:16 ` Jim Porter
2022-02-24  9:35   ` Lars Ingebrigtsen
2022-02-24 11:03     ` Eli Zaretskii
2022-02-24 18:55       ` Jim Porter [this message]
2022-02-24 20:03         ` Eli Zaretskii
2022-02-24 20:07           ` Lars Ingebrigtsen
2022-02-25  1:04             ` Jim Porter
2022-02-25  2:18               ` Lars Ingebrigtsen
2022-02-25  7:09               ` Eli Zaretskii
2022-02-25 18:31                 ` 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=7f820c27-a58c-3b2b-3132-a57e2a25ea96@gmail.com \
    --to=jporterbugs@gmail.com \
    --cc=54136@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=larsi@gnus.org \
    /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).