GNU bug report logs -
#71853
29.4; `kill-compilation` does not kill compilation process on Windows
Previous Next
Reported by: Tze Chian Kam <tze.chian.kam <at> gmail.com>
Date: Sun, 30 Jun 2024 07:18:02 UTC
Severity: normal
Tags: moreinfo
Found in version 29.4
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> From: Tze Chian Kam <tze.chian.kam <at> gmail.com>
> Date: Wed, 3 Jul 2024 13:26:32 +1000
> Cc: 71853 <at> 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.
This bug report was last modified 307 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.