From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#71853: 29.4; `kill-compilation` does not kill compilation process on Windows Date: Wed, 03 Jul 2024 14:17:06 +0300 Message-ID: <86h6d6bu8d.fsf@gnu.org> References: <86plryhk91.fsf@gnu.org> <86zfr2fhb5.fsf@gnu.org> <86h6d9fj3m.fsf@gnu.org> <86o77gc6f5.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31918"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 71853@debbugs.gnu.org To: Tze Chian Kam Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jul 03 13:18:23 2024 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 1sOy0E-0007zo-Ew for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 03 Jul 2024 13:18:22 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sOxzz-0002PC-8C; Wed, 03 Jul 2024 07:18:07 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sOxzw-0002Oe-95 for bug-gnu-emacs@gnu.org; Wed, 03 Jul 2024 07:18:04 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sOxzs-0007ZO-Lt for bug-gnu-emacs@gnu.org; Wed, 03 Jul 2024 07:18:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sOxzu-00032n-6J for bug-gnu-emacs@gnu.org; Wed, 03 Jul 2024 07:18:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 03 Jul 2024 11:18:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71853 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 71853-submit@debbugs.gnu.org id=B71853.172000543911646 (code B ref 71853); Wed, 03 Jul 2024 11:18:02 +0000 Original-Received: (at 71853) by debbugs.gnu.org; 3 Jul 2024 11:17:19 +0000 Original-Received: from localhost ([127.0.0.1]:38979 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sOxzD-00031m-7V for submit@debbugs.gnu.org; Wed, 03 Jul 2024 07:17:19 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:42554) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sOxzB-00031Z-Fz for 71853@debbugs.gnu.org; Wed, 03 Jul 2024 07:17:18 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sOxz3-0007T7-2v; Wed, 03 Jul 2024 07:17:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=QbsqKKntX8lVlpUtNsVP9qpsGRtnK82dqKRYzab7rK0=; b=Z7P8iLJkQbp1 f/MyQO3sisvNIxUK3EZXFqQJQ5LAGEB4qsH9Q30r0UzKapGusYWMpMqyb6sbuSebTHL25VXOQ0yvm BSYQSw1PtGCYMFXnfqlDQbIxR20Y7TjKjHEP3Qi6oIGC1aqkw1ze7Pxb/16chvom5XbtJNS+Gm1Cc acC6vvmdcP7pMjq67EDC7S9fS3VYZ2mZPKqPKEtINp9fYTNSNkVsma2GmR/gR/TL5tIRSdFntgqn8 cdTgZHn+EapNAzyQA2U8Vou46593KENrtyNTjQRi+1uCjLjmcZsWZB18xK1c+4BL/VhpJiIDuSvlL QTYBZKLNVdBhEw88SIGy0Q==; In-Reply-To: (message from Tze Chian Kam on Wed, 3 Jul 2024 13:26:32 +1000) 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:288311 Archived-At: > From: Tze Chian Kam > Date: Wed, 3 Jul 2024 13:26:32 +1000 > Cc: 71853@debbugs.gnu.org > > > > It is a MSYS2 build of Python. > > > > So it's not a native Windows executable, I think, and this could well > > explain what you see. What does typing the below display? > > > > M-: (w32-application-type (executable-find "python")) RET > > I get "w32-native". I guess our detection of MSYS applications needs some update? Can you show the list of DLLs that your MSYS2 python.exe depends on? If you have GNU Binutils installed, the following command should show that: objdump -x /path/to/python.exe | fgrep "DLL Name" > > Also, does setting w32-start-process-share-console to a non-nil value > > help with interrupting the MSYS2 Python? > > Yes, it does. So I guess that version of Python is incompatible with the default method of interrupting sub-processes that Emacs on Windows uses. It is known that some programs need such a special handling on Windows. > > Some kind of buffering problem, I guess? Try invoking "python -u" to > > get unbuffered stdout. > > This will work. However, I tested on another C program and the problem > still occurs, meaning that my Emacs is buffering everything for some > reason. It isn't Emacs, it's the OS. Emacs on Windows uses pipes to talk to sub-processes, and pipes are buffered. You need to fflush in your program. This is a known issue without any general solution. So, bottom line, I see no bug here, only known limitations of handling sub-processes on MS-Windows.