Subject: bug#58440: 27.2; Exit Code on SIGINT is Zero, But shouldn't Be

From: Mattias Engdegård <[email-masked]>
Date: Thu, 13 Oct 2022 10:05:16 +0200

13 okt. 2022 kl. 08.34 skrev Lars Ingebrigtsen <[email-masked]>:

> That's true.  Perhaps it'd be instructive to check what other GUI
> programs return on SIGINT?
> 
> Let's see...  gimp returned non-zero.  So did xterm.  And so did xeyes.

Yes, it's the natural outcome in any normal GUI application that doesn't have Emacs's complicated relation to SIGINT.

I certainly don't mind if you change Emacs in this respect. The root of the problem is that we use SIGINT for C-g. More precisely, that we set C-g as the INTR char for TTY frames. (This is done for historical reasons and should be understood in that context.)