From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jim Porter Newsgroups: gmane.emacs.bugs 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 Message-ID: <7f820c27-a58c-3b2b-3132-a57e2a25ea96@gmail.com> References: <1bfc8b00-0062-70b6-6492-01cf3947e55b@gmail.com> <1157b5f3-a393-1c2d-7f7d-2c01d4e7f1e3@gmail.com> <87y22038uz.fsf@gnus.org> <834k4osf07.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3049"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 54136@debbugs.gnu.org To: Eli Zaretskii , Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Feb 24 20:28:23 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nNJmp-0000bW-2d for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 24 Feb 2022 20:28:23 +0100 Original-Received: from localhost ([::1]:39614 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nNJmn-0002DP-GS for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 24 Feb 2022 14:28:21 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:55772) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nNJHW-0002V1-RH for bug-gnu-emacs@gnu.org; Thu, 24 Feb 2022 13:56:05 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:56531) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nNJHW-0006Fh-Ht for bug-gnu-emacs@gnu.org; Thu, 24 Feb 2022 13:56:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nNJHW-0000Uz-Hm for bug-gnu-emacs@gnu.org; Thu, 24 Feb 2022 13:56:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Jim Porter Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 24 Feb 2022 18:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54136 X-GNU-PR-Package: emacs Original-Received: via spool by 54136-submit@debbugs.gnu.org id=B54136.16457289571906 (code B ref 54136); Thu, 24 Feb 2022 18:56:02 +0000 Original-Received: (at 54136) by debbugs.gnu.org; 24 Feb 2022 18:55:57 +0000 Original-Received: from localhost ([127.0.0.1]:50428 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nNJHR-0000Uf-2S for submit@debbugs.gnu.org; Thu, 24 Feb 2022 13:55:57 -0500 Original-Received: from mail-pj1-f46.google.com ([209.85.216.46]:53013) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nNJHP-0000UT-Nc for 54136@debbugs.gnu.org; Thu, 24 Feb 2022 13:55:56 -0500 Original-Received: by mail-pj1-f46.google.com with SMTP id v4so2785743pjh.2 for <54136@debbugs.gnu.org>; Thu, 24 Feb 2022 10:55:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=subject:to:cc:references:from:message-id:date:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=G0Nt92HdrjmJysyCGuVbE+AYmK0oZ2hqQHqzeAr4+40=; b=ZPXHsQBrbyP9tApIQgT+aY/noyVWq4cRyriDOZImNlKZmCaygCsAGd3d2wuoyNdNo+ RUdLyKRGUmExTLCxRJdggjJNAfMp0v2MVwsDuivT+q3VyV2+dbVnnSKS1Hkx43eY0WY8 +ApRdfO9LylPbD4+zaWV9EcnYTQdISBUxkMPgVLcVuEpN1wX5seKH+bVicXK5mtG8pRI qPWFnJbyrrg8DVYgustQRR68yx29z1CNaUUkJjv4zQE3bFRzIFZrh/XwADpdSL7tuiTc Fa/2PJ3I/+xpm3NOYOKpxrJaoEilrIBDk30kht4XhtbV9h1j0kp2orbcSHLha+yIeLbE DBrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=G0Nt92HdrjmJysyCGuVbE+AYmK0oZ2hqQHqzeAr4+40=; b=luENKG84l5Bpq2UG5WOV9mIrXSOelm6KZAjinAREqK+faGHxle2CDaul9DDva9BFQr +nl6HzryoyY6bqZA2ZL3U6gbwW7Ep8OV47f0+HDelV/MktzPQFYzadpT3mLgGmGq0SXo K8HnD+wcSGzkqH+UlKHSabVdR781wCjlcjY5Zf1u6n7GHPuw8UlxWorM2OG1y/rWuXlD M792ii4u1B3OTZXAKSrbzPqXtLEQr4VHVnXZ0iyztlqkFYkqF8i9CDUjav7+cC98uHOq Y8IwwV80+X4JUB9HQvIPL81TR/5PrGLK5T2gUDuL9ZdhH0ozQkAZnZdiwhSknr+1xSld OEzQ== X-Gm-Message-State: AOAM532oS61OMUepGGGtCCPdR3050z6HdN6vik+yLg3cWYwoDAN3O9mh C0e/kQrkcve2t8ALzSwJD8IXlP/x2uM= X-Google-Smtp-Source: ABdhPJwi9IzLIqfE0AYEaT5O4XmGSay+0DFiBUHEripRW2m/s4nho5A/jRD2BiaNhgfy/y5f1btpYA== X-Received: by 2002:a17:902:c403:b0:14f:ecc9:bc82 with SMTP id k3-20020a170902c40300b0014fecc9bc82mr3807067plk.27.1645728949781; Thu, 24 Feb 2022 10:55:49 -0800 (PST) Original-Received: from [192.168.1.2] (cpe-76-168-148-233.socal.res.rr.com. [76.168.148.233]) by smtp.googlemail.com with ESMTPSA id e11-20020a63e00b000000b0037341d979b8sm207302pgh.94.2022.02.24.10.55.48 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 24 Feb 2022 10:55:49 -0800 (PST) In-Reply-To: <834k4osf07.fsf@gnu.org> Content-Language: en-US X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:227596 Archived-At: On 2/24/2022 3:03 AM, Eli Zaretskii wrote: >> From: Lars Ingebrigtsen >> 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).