GNU bug report logs - #46494
28.0.50; [native-comp] Problems with async background compile

Previous Next

Package: emacs;

Reported by: Andy Moreton <andrewjmoreton <at> gmail.com>

Date: Sat, 13 Feb 2021 16:59:02 UTC

Severity: normal

Found in version 28.0.50

Done: Andrea Corallo <akrl <at> sdf.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Andy Moreton <andrewjmoreton <at> gmail.com>
To: 46494 <at> debbugs.gnu.org
Subject: bug#46494: 28.0.50; [native-comp] Problems with async background compile
Date: Sat, 20 Feb 2021 12:09:06 +0000
On Sat 20 Feb 2021, Eli Zaretskii wrote:

> OK, I've reviewed the code which kills subprocesses when Emacs is shut
> down, and I have some questions:
>
>   . How does libgccjit handle the case that its process is exiting?
>     Does it have any atexit handlers or static destructors?  IOW, how
>     does it ensure its own subprocesses, like gas etc. are terminated?
>
>   . When we invoke Emacs in a subprocess to do the async compilation,
>     do we specify that it should be killed without query?  I don't see
>     this in the code (did I miss it?), but if we don't, then exiting
>     Emacs will ask the user whether to kill the subprocesses -- does
>     it?
>
> Andy, if instead if exiting Emacs, you use signal-process, like this:
>
>   M-: (signal-process PROC-ID 'SIGHUP) RET
>
> (where PROC-ID is the process ID of the Emacs subprocess running the
> native compilation), do you see the same crash, or does the subprocess
> exit cleanly?  To see the PROC-ID, you can use the Task manager or the
> 'pslist' command from the PsTools suite.

I tried that by adding binding this to a key:
  (defun signal-hup (proc)
    (interactive "nProcess: ")
    (signal-process proc 'SIGHUP))

On a x86_64-w64-mingw32 build, sending SIGHUP to a compilation
subprocess results in the emacs abort dialog being shown briefly and
then disappearing (without user interaction). That dialog should require
pressing a button to dismiss it.

    AndyM





This bug report was last modified 4 years and 69 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.