From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Tze Chian Kam Newsgroups: gmane.emacs.bugs Subject: bug#71853: 29.4; `kill-compilation` does not kill compilation process on Windows Date: Wed, 3 Jul 2024 13:26:32 +1000 Message-ID: References: <86plryhk91.fsf@gnu.org> <86zfr2fhb5.fsf@gnu.org> <86h6d9fj3m.fsf@gnu.org> <86o77gc6f5.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6309"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 71853@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jul 03 05:28:17 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 1sOqfI-0001Or-9l for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 03 Jul 2024 05:28:16 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sOqf4-0004oq-VJ; Tue, 02 Jul 2024 23:28:02 -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 1sOqf3-0004oh-Mg for bug-gnu-emacs@gnu.org; Tue, 02 Jul 2024 23:28:01 -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 1sOqf2-00008Y-Mu for bug-gnu-emacs@gnu.org; Tue, 02 Jul 2024 23:28:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sOqf4-00044v-07 for bug-gnu-emacs@gnu.org; Tue, 02 Jul 2024 23:28:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Tze Chian Kam Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 03 Jul 2024 03:28: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.171997727515664 (code B ref 71853); Wed, 03 Jul 2024 03:28:01 +0000 Original-Received: (at 71853) by debbugs.gnu.org; 3 Jul 2024 03:27:55 +0000 Original-Received: from localhost ([127.0.0.1]:38285 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sOqex-00044a-Ca for submit@debbugs.gnu.org; Tue, 02 Jul 2024 23:27:55 -0400 Original-Received: from mail-ed1-f48.google.com ([209.85.208.48]:54643) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sOqeu-00044J-Qv for 71853@debbugs.gnu.org; Tue, 02 Jul 2024 23:27:54 -0400 Original-Received: by mail-ed1-f48.google.com with SMTP id 4fb4d7f45d1cf-58b966b41fbso1818126a12.1 for <71853@debbugs.gnu.org>; Tue, 02 Jul 2024 20:27:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719977205; x=1720582005; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=J6GR5+i+ISq0P5Mllpm6F/BvA68Xr+jLC/mA3ZXd7dk=; b=CGoVT6GNVnveTU2MB5GV11l9H7K/0qe0ws1Ja6BvLKtGS/lKvFYj9H9GHyvGd/2Quk AwsYjsg/0dQAshIZW/rfX8SXQaK77tzs5qRK/6LnUexR5bZ1U4wZ71uvrwJFH/KosXUK V2EaiJPU53hcUJ/Odvx4Vvra7gm76A76PmTeHC8t69gSxbntUSig4+YizIwHao1CZdoe z0ybsQBn5/SYfgC7/JjLcJYWnCRtvnmIXDWMXLdgAXIgoC3clFkqm3JUIwTuUgo64Mas DXqKpatei4unAM2U/tbrLln/fnbueAj5t6Dklv0aeRDdl5v51sAFL7y4SsesJHUR008I 9NIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719977205; x=1720582005; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=J6GR5+i+ISq0P5Mllpm6F/BvA68Xr+jLC/mA3ZXd7dk=; b=L9lIOTNitqEOHyW+OIDOQKBrfkziEftTBFff5QIScIzPm4cIiYm7H73ZoVmLz6ICb9 /Oiacz33FfsYNwQG3hOLq+9hqtXiJmF5HFwRR80MMv4GL/JjTPoJqpJy9nOVmI9ssXCe aSyyd6Hs6ATx6ksBDNX1ZZ8vhxoiwf1ep5RTk2uC5i5MMWTX6UCWnRgY4AfM7hEXqown JbevwjJYJe/bMc1R8r6WrKe5F7+JkdAbqfAnl1epRkUphVOcwdYTkDnQ0o96Oa/KFyHi jkEHY+NR9OwqXi7RSUw/hngoBijGNRSnrXp663JDfk8q7silaW7HfJPtOjL4lOkCMj3j KU+g== X-Gm-Message-State: AOJu0YyTSQm2KQWXoG8PPNwcexK35uXElkDrm0MF1Co9dwyZovgWx+Tg ffCSbijQLmOjPiUO5PGoqgVjkAOziHTxIPLq+xF7xZPEd6izxidGv0xwn3Pl6fvOrIzKwVUKN+C f1y9hyerZTZf9JhN9ed2BVh0Wkdw= X-Google-Smtp-Source: AGHT+IFHxiUsdGn/tm852+zT2EGGmg6732CX1au9Ggit6u0LsnFPqxCW8XiAWNgdcUlV03w8gHHma/uTiVMghBXUhQk= X-Received: by 2002:a05:6402:1ec1:b0:57c:8022:a3db with SMTP id 4fb4d7f45d1cf-5879f0cbe78mr7245280a12.6.1719977204963; Tue, 02 Jul 2024 20:26:44 -0700 (PDT) In-Reply-To: <86o77gc6f5.fsf@gnu.org> 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:288304 Archived-At: > From: Eli Zaretskii > Date: Tue, 02 Jul 2024 15:41:34 +0300 > > > 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 I get "w32-native". > Also, does setting w32-start-process-share-console to a non-nil value > help with interrupting the MSYS2 Python? Yes, it does. > > 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. 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. Here is my test file: ``` #include #include int main() { for (int i = 0; i < 5; ++i) { printf("%d\n", i); sleep(1); } return 0; } ```