From: Philipp Stephani <p.stephani2@gmail.com>
To: Andreas Politz <politza@hochschule-trier.de>,
Eli Zaretskii <eliz@gnu.org>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Weird behavior of kill-emacs
Date: Wed, 18 Feb 2015 20:49:04 +0000 [thread overview]
Message-ID: <CAArVCkQVv0VCQVS4z=fMR=NHo_FW=4==HXc-xnRdgc_wnyPvqQ@mail.gmail.com> (raw)
In-Reply-To: 874mqj0ys6.fsf@hochschule-trier.de
Andreas Politz <politza@hochschule-trier.de> schrieb am Wed Feb 18 2015 at
9:07:44 PM:
> Eli Zaretskii <eliz@gnu.org> writes:
>
> >> Is there a way to work around this behavior?
> >
> > Why would you want to?
>
> emacs < /dev/null -Q --batch --eval '(progn (ignore-errors (read))
> (kill-emacs 42))'; echo $?
>
> returns with exit code 0, i.e. the argument to kill-emacs is ignored. I
> guess the OP reads from stdin until EOF, which implies a fixed exit code
> of 0.
>
Exactly. In the case of the flycheck unit test suite the behavior is
triggered by some invocations of yes-or-no-p that try to read from stdin,
but it's closed, so this path is triggered and Emacs exits with a code of 0
even if the tests fail.
next prev parent reply other threads:[~2015-02-18 20:49 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-18 18:58 Weird behavior of kill-emacs Philipp Stephani
2015-02-18 19:18 ` Eli Zaretskii
2015-02-18 20:07 ` Andreas Politz
2015-02-18 20:49 ` Philipp Stephani [this message]
2015-02-18 20:44 ` Philipp Stephani
2015-02-18 21:02 ` Andreas Politz
2015-02-18 19:25 ` Eli Zaretskii
2015-02-18 21:04 ` Philipp Stephani
2015-02-18 21:17 ` 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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAArVCkQVv0VCQVS4z=fMR=NHo_FW=4==HXc-xnRdgc_wnyPvqQ@mail.gmail.com' \
--to=p.stephani2@gmail.com \
--cc=eliz@gnu.org \
--cc=help-gnu-emacs@gnu.org \
--cc=politza@hochschule-trier.de \
/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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).