Subject: bug#71853: 29.4; `kill-compilation` does not kill compilation process on Windows

From: Eli Zaretskii <[email-masked]>
Date: Sun, 30 Jun 2024 12:07:06 +0300

tags 71853 moreinfo
thanks

> From: Tze Chian Kam <[email-masked]>
> Date: Sun, 30 Jun 2024 12:57:11 +1000
> 
> Steps to reproduce:
> 1) Open Emacs with `-q`.
> 2) Run a trivial file with an infinite loop with `M-x compile`

Please show the exact file you used as the compilation command,
because I cannot reproduce this with a few programs I tried, see
below.

> Expected outcome:
> Should be able to kill the process with `M-x kill-compilation` or
> `C-c C-k`.
> 
> Actual outcome:
> `C-c C-k` is ignored and `M-x kill-compilation` is ran but does not
> stop the process.

I tried this with several commands and it worked for me with all of
them.  Here are the commands I tried:

  . sleep 20
  . ping -t SOME-EXISTING-SITE
  . a batch file which does this:

     @echo off
     :again
     ping -n 1 SOME-EXISTING-SITE
     sleep 60s
     goto again

In all three cases, I get the same expected result in the
*compilation* buffer:

  Compilation interrupt at Sun Jun 30 11:58:49, duration 4.44 s

(with the time and the "duration" values changing as appropriate).

So I suspect the problem is with some specific command/program or a
group of programs that behave in a specific way.  Thus the request to
show which program you used in your case.

(Just to be sure: you typed "C-c C-k" from the *compilation* buffer,
yes?  If you want to interrupt the compilation process from another
buffer, you need to invoke kill-compilation by name, via M-x.)

> For now, I have a workaround to advice `compile` to interactive mode
> (comint) and killing the process with `C-c C-\`. Is this a Windows
> problem or my setup?

Not clear yet; more info is needed.