help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Weird behavior of kill-emacs


From: Philipp Stephani
Subject: Re: Weird behavior of kill-emacs
Date: Wed, 18 Feb 2015 20:49:04 +0000

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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]