From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Joost Newsgroups: gmane.emacs.devel Subject: `interrupt-process` doesn't work for Python on Windows Date: Wed, 09 Feb 2022 10:17:33 +0100 Message-ID: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12981"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Cyrus-JMAP/3.5.0-alpha0-4748-g31a5b5f50e-fm-cal2020-20220204.001-g31a5b5f5 To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Feb 09 11:42:38 2022 Return-path: Envelope-to: ged-emacs-devel@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 1nHkQm-0003A3-PF for ged-emacs-devel@m.gmane-mx.org; Wed, 09 Feb 2022 11:42:37 +0100 Original-Received: from localhost ([::1]:52546 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nHkQl-0000eg-9i for ged-emacs-devel@m.gmane-mx.org; Wed, 09 Feb 2022 05:42:35 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:59504) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nHj7F-0001Tn-Qq for emacs-devel@gnu.org; Wed, 09 Feb 2022 04:18:22 -0500 Original-Received: from out4-smtp.messagingengine.com ([66.111.4.28]:42279) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nHj6q-00032C-A6 for emacs-devel@gnu.org; Wed, 09 Feb 2022 04:17:58 -0500 Original-Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id C9FFD5C00FE for ; Wed, 9 Feb 2022 04:17:54 -0500 (EST) Original-Received: from imap45 ([10.202.2.95]) by compute1.internal (MEProxy); Wed, 09 Feb 2022 04:17:54 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.fm; h= cc:content-type:date:date:from:from:in-reply-to:message-id :mime-version:reply-to:sender:subject:subject:to:to; s=fm2; bh=i Fv2BcTuPgk66xOQCyveLvj6SA4rZvvcyQW1vqCDpFU=; b=IMbRHIHbpcdRVQdbg X2dfqlONJm+7cDjopdmQZ4bwBl6Dva6mF9AAXeBzB/HqDAzxuOcvQRuw6w90VAI1 G426rDa6LeS1zyreAOWuKcMhV1YptC3f4/EEMMRg0NNOITzngE+rUmFgPzYALH0Z 2SeQh44Y0JblhJbvluy1miKDOGqIgykBeG2vdoB1VvYrneZ0fsEJidnDcwrh3ty8 SUxJxIEaGpjld5LSBZ1OWCTeNWQVhkT8WnGVNaye9BuWwgXBo+CEhCViP2at2NH0 GGsmzznersx5TeON8BuQ0DU6y/2CSJmaVnzK0Wv7FGnAeEq2PFvuftLlQuRIqrDw ixrHQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:date:from:from :in-reply-to:message-id:mime-version:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=iFv2BcTuPgk66xOQCyveLvj6SA4rZvvcyQW1vqCDp FU=; b=bvo6D+9WhHoYXYx6TGUxvL8wvXYFGM0PGGRF5o0+EW/XSHbi2HrTSuu4E X9Z9lvkMZN4Xpg+N4bU7vySF4WhsDA8PXHV8Q4jtW+200NAMy/4xeCiFGCjceO3p TkGgtUxvgXRCkqfkprQ1ct3j+fiQrjspY6wR9WY6c4r09GFK8fhS9tgNOo3oeRZu mkEzpl2sNoTHK1Lq/um7+JkaVnfmQpSzIbz3F1aYNy+hSc0p5iX53uSSRLo1k4Q+ LJMcc98O1royPRJCMOwbddmftJVL6KpvQ0y2mW4Dimc5yGBCdmdBgK0HUxRKwrvU p/XXfByrWjEdjLLypxeo/cu0TYg4Q== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrheelgddtudcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhepofgfggfkfffhvffutgesthdtredtre ertdenucfhrhhomheplfhoohhsthcuoehjohhoshhtkhhrvghmvghrshesfhgrshhtmhgr ihhlrdhfmheqnecuggftrfgrthhtvghrnhepfefgvefgveduhedtkefhiedvudeiffelie eugeeihfelfffhjeehieejjedtiedunecuffhomhgrihhnpehgihhthhhusgdrtghomhen ucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehjohhosh htkhhrvghmvghrshesfhgrshhtmhgrihhlrdhfmh X-ME-Proxy: Original-Received: by mailuser.nyi.internal (Postfix, from userid 501) id 92FE224A0077; Wed, 9 Feb 2022 04:17:54 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface Received-SPF: pass client-ip=66.111.4.28; envelope-from=joostkremers@fastmail.fm; helo=out4-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:286087 Archived-At: Hi, After running into an issue with a package that enhances Emacs' inferior Python shell and a long back and forth with the package's maintainer, the maintainer feels there might be a bug in Emacs. Specifically, the command `interrupt-process` is not able to interrupt the Python process on Windows. Details are in this message and in the message's thread: https://github.com/jdtsmith/python-mls/issues/8#issuecomment-1033120469 To quote the relevant section: ==================== Here is the issue: `interrupt-process` (and internal C function) does not function correctly to interrupt Python on Windows emacs! While at the command prompt, a simple `C-c` does correctly interrupt (and returns `Keyboard Interrupt\n>>> ` promptly), `interrupt-process` does not, and leads to the double-traceback you reported earlier, but _only after you send another newline_. This is incorrect behavior, and seems to represent a bug in the way Emacs sends interrupts on Windows, which differs from `C-c` in the command prompt. It's easy to verify the difference: * `C-c` at `>>> ` python prompt in "Command Prompt": immediate `KeyboardInterrupt` and prompt. * `C-c C-c` at `>>> ` python prompt in Emacs _Python_: no `KeyboardInterrupt`. ==================== Should I file a bug report about this? Or is this something Emacs can do nothing about? TIA Joost -- Joost Kremers Life has its moments