From: Lars Ingebrigtsen <larsi@gnus.org>
To: "Mattias Engdegård" <mattias.engdegard@gmail.com>
Cc: 58440@debbugs.gnu.org, Morten Welinder <mwelinder@gmail.com>,
Eli Zaretskii <eliz@gnu.org>
Subject: bug#58440: 27.2; Exit Code on SIGINT is Zero, But shouldn't Be
Date: Wed, 12 Oct 2022 17:46:55 +0200 [thread overview]
Message-ID: <87a661avtc.fsf@gnus.org> (raw)
In-Reply-To: <2A45406C-33B5-4A42-88F8-001D53C7351D@gmail.com> ("Mattias Engdegård"'s message of "Wed, 12 Oct 2022 17:31:33 +0200")
Mattias Engdegård <mattias.engdegard@gmail.com> writes:
>> It does seem like a bug -- I'd expect a non-zero exit code in this case.
>
> It's by design, more or less: see handle_interrupt_signal in
> keyboard.c. Whether that design is desired or not is a different
> matter.
>
> (C-g should probably not generate a signal in the first place; it
> creates more problems than it solves.)
Hm, sounds like it...
But looking at the code:
----
/* The SIGINT handler.
If we have a frame on the controlling tty, we assume that the
SIGINT was generated by C-g, so we call handle_interrupt.
Otherwise, tell maybe_quit to kill Emacs. */
static void
handle_interrupt_signal (int sig)
----
But if I
./src/emacs -Q && echo 'OK'
and then `C-g', that has no effect, but we still hit this logic? And
even if:
(./src/emacs -Q && echo 'OK' )&
where the Emacs definitely isn't attached to the tty, then `C-g' in the
terminal can't have any effect (and doesn't). But we still end up in
this code?
That seems like a bug, possibly?
next prev parent reply other threads:[~2022-10-12 15:46 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-11 13:48 bug#58440: 27.2; Exit Code on SIGINT is Zero, But shouldn't Be Morten Welinder
2022-10-12 11:22 ` Lars Ingebrigtsen
2022-10-12 14:23 ` Eli Zaretskii
2022-10-12 14:41 ` Lars Ingebrigtsen
2022-10-12 15:40 ` Eli Zaretskii
2022-10-12 15:31 ` Mattias Engdegård
2022-10-12 15:46 ` Lars Ingebrigtsen [this message]
2022-10-12 15:54 ` Lars Ingebrigtsen
2022-10-12 17:39 ` Mattias Engdegård
2022-10-13 6:34 ` Lars Ingebrigtsen
2022-10-13 8:05 ` Mattias Engdegård
2022-10-13 8:12 ` Lars Ingebrigtsen
2022-10-13 10:31 ` Eli Zaretskii
2022-10-13 11:31 ` Lars Ingebrigtsen
2022-10-13 13:16 ` Mattias Engdegård
2022-10-13 15:51 ` Eli Zaretskii
2022-10-13 19:03 ` Lars Ingebrigtsen
2022-10-13 19:35 ` Eli Zaretskii
2022-10-13 16:33 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87a661avtc.fsf@gnus.org \
--to=larsi@gnus.org \
--cc=58440@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=mattias.engdegard@gmail.com \
--cc=mwelinder@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.