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

From: Eli Zaretskii <[email-masked]>
Date: Wed, 12 Oct 2022 18:40:40 +0300

> From: Lars Ingebrigtsen <[email-masked]>
> Cc: [email-masked],  [email-masked]
> Date: Wed, 12 Oct 2022 16:41:00 +0200
> 
> Eli Zaretskii <[email-masked]> writes:
> 
> > What happens if you say
> >
> >   ./src/emacs -Q && echo 'OK'
> >
> > does it say OK when you kill Emacs with SIGINT?
> 
> Yes.

That's strange.  So the next step is to attach a debugger to Emacs
before delivering SIGINT to it, and see why we don't exit with the
status of 1.

What I verified is that when I do

  ./src/emacs -Q -nw && echo 'OK'

and then type "kill -INT EMACS-PID" from another terminal, Emacs does
a keyboard quit (i.e. flashes the display and says "Quit" in the
echo-area), which is exactly as I expect.  So in the -nw case, the
installed SIGINT handler is called and does what is expected.