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: Tue, 02 Jul 2024 15:41:34 +0300 Message-ID: <86o77gc6f5.fsf@gnu.org> References: <86plryhk91.fsf@gnu.org> <86zfr2fhb5.fsf@gnu.org> <86h6d9fj3m.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30935"; 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 Tue Jul 02 14:42:56 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 1sOcqW-0007qX-4M for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 02 Jul 2024 14:42:56 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sOcq6-0007He-Gl; Tue, 02 Jul 2024 08:42:30 -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 1sOcpf-0007DW-0f for bug-gnu-emacs@gnu.org; Tue, 02 Jul 2024 08:42: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 1sOcpc-0000dK-P7 for bug-gnu-emacs@gnu.org; Tue, 02 Jul 2024 08:42:00 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sOcpd-0007mI-QP for bug-gnu-emacs@gnu.org; Tue, 02 Jul 2024 08:42:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 02 Jul 2024 12:42:01 +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.171992410829877 (code B ref 71853); Tue, 02 Jul 2024 12:42:01 +0000 Original-Received: (at 71853) by debbugs.gnu.org; 2 Jul 2024 12:41:48 +0000 Original-Received: from localhost ([127.0.0.1]:36210 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sOcpP-0007lp-Pd for submit@debbugs.gnu.org; Tue, 02 Jul 2024 08:41:48 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:60670) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sOcpN-0007lX-4r for 71853@debbugs.gnu.org; Tue, 02 Jul 2024 08:41:46 -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 1sOcpG-0000bP-Ml; Tue, 02 Jul 2024 08:41:38 -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=kGUIsJnPLYp82duqe30iSypWZGLP95osAp/qwSbWLlA=; b=GekkMRwLcg9M pdwBxx3323q6qUw9BiyWBJbd1kYueLpnqTSnyNhJnI7g7+BxODe0se6UOBmoMLz/Y2vfgh/9DfSZI NNeQd57Sv3p2xngFY0cA8BXTd02KN1TrSox9KQztZwS/G1DrkuLpKHbyHTQniMiboWbQyZAISrERh 22MlBYSQcAr7v+2xA1bk2CxczjpZH4RP4OnuETF5lFCSjWWeYDYJKvbj7QG9gxfNRU56u4XpX/zpG jskX4SSHTJR3MJoHYUQJdcTDIOEaOEFh7US6IjQkxEunqTsyb7ryV27ZbgqGkeP8jjDCzYai9NaRy 1zXtmv2uOpG0VA4Zk8fYgQ==; In-Reply-To: (message from Tze Chian Kam on Tue, 2 Jul 2024 16: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:288284 Archived-At: > From: Tze Chian Kam > Date: Tue, 2 Jul 2024 16:26:32 +1000 > Cc: 71853@debbugs.gnu.org > > > From: Eli Zaretskii > > Date: Mon, 01 Jul 2024 14:27:09 +0300 > > > > > From: Tze Chian Kam > > > Date: Mon, 1 Jul 2024 12:53:51 +1000 > > > Cc: 71853@debbugs.gnu.org > > > > > > > > Sorry, I used a Python file: > > > > > ``` > > > > > import time > > > > > > > > > > while True: > > > > > print("active") > > > > > sleep(1) > > > > > ``` > > > > > > > > And how exactly did you invoke this? Please show the complete > > > > command you typed at the prompt of "M-x compile", because trying > > > > to reproduce this (see below) I could't. > > > > > > I did "M-x compile RET python loop.py RET". Also, when running this > > > program, it does not output anything in the *compilation* buffer ("active" > > > is not printed every second). > > > > The fact that it doesn't print "active" is already a sign of some > > problem. > > > > Where did you download your Python from? Is it a native Windows > > executable, or something else, like Cygwin or MSYS2 build of Python? > > 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 Also, does setting w32-start-process-share-console to a non-nil value help with interrupting the MSYS2 Python? > I just tested with Emacs in my global path (so I can launch Emacs from > Powershell/Command Prompt) and it "C-c C-k' works (using native > Windows Python) but I still can't see the prints before killing the process. Some kind of buffering problem, I guess? Try invoking "python -u" to get unbuffered stdout.