* src/emacs.c (Fkill_emacs): In noninteractive mode exit
non-successfully if a write error occurred on stdout. (Bug#9574)
This commit is contained in:
parent
9168308956
commit
8eca8a7c48
2 changed files with 10 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
2011-09-23 Andreas Schwab <schwab@linux-m68k.org>
|
||||
|
||||
* emacs.c (Fkill_emacs): In noninteractive mode exit
|
||||
non-successfully if a write error occurred on stdout. (Bug#9574)
|
||||
|
||||
2011-09-21 Eli Zaretskii <eliz@gnu.org>
|
||||
|
||||
* xdisp.c (pop_it): Allow it->object that is a cons cell to pass
|
||||
|
|
|
@ -1993,6 +1993,7 @@ all of which are called before Emacs is actually killed. */)
|
|||
{
|
||||
struct gcpro gcpro1;
|
||||
Lisp_Object hook;
|
||||
int exit_code;
|
||||
|
||||
GCPRO1 (arg);
|
||||
|
||||
|
@ -2017,7 +2018,10 @@ all of which are called before Emacs is actually killed. */)
|
|||
if (STRINGP (Vauto_save_list_file_name))
|
||||
unlink (SSDATA (Vauto_save_list_file_name));
|
||||
|
||||
exit (INTEGERP (arg) ? XINT (arg) : EXIT_SUCCESS);
|
||||
exit_code = EXIT_SUCCESS;
|
||||
if (noninteractive && fflush (stdout))
|
||||
exit_code = EXIT_FAILURE;
|
||||
exit (INTEGERP (arg) ? XINT (arg) : exit_code);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue