diff options
| author | Andreas Schwab | 2011-09-23 11:56:55 +0200 |
|---|---|---|
| committer | Andreas Schwab | 2011-09-23 11:56:55 +0200 |
| commit | 8eca8a7c4885c27af36f52320185dbcae5f693e0 (patch) | |
| tree | 0c94d765a5536b2c3d6e631b28957e03632f3d79 | |
| parent | 916830895691c3f7a944d195f5d0d38e3c109439 (diff) | |
| download | emacs-8eca8a7c4885c27af36f52320185dbcae5f693e0.tar.gz emacs-8eca8a7c4885c27af36f52320185dbcae5f693e0.zip | |
* src/emacs.c (Fkill_emacs): In noninteractive mode exit
non-successfully if a write error occurred on stdout. (Bug#9574)
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/emacs.c | 6 |
2 files changed, 10 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index dff41f1dbbf..44a76068313 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2011-09-23 Andreas Schwab <schwab@linux-m68k.org> | ||
| 2 | |||
| 3 | * emacs.c (Fkill_emacs): In noninteractive mode exit | ||
| 4 | non-successfully if a write error occurred on stdout. (Bug#9574) | ||
| 5 | |||
| 1 | 2011-09-21 Eli Zaretskii <eliz@gnu.org> | 6 | 2011-09-21 Eli Zaretskii <eliz@gnu.org> |
| 2 | 7 | ||
| 3 | * xdisp.c (pop_it): Allow it->object that is a cons cell to pass | 8 | * xdisp.c (pop_it): Allow it->object that is a cons cell to pass |
diff --git a/src/emacs.c b/src/emacs.c index 321e7919c93..0a684d4423c 100644 --- a/src/emacs.c +++ b/src/emacs.c | |||
| @@ -1993,6 +1993,7 @@ all of which are called before Emacs is actually killed. */) | |||
| 1993 | { | 1993 | { |
| 1994 | struct gcpro gcpro1; | 1994 | struct gcpro gcpro1; |
| 1995 | Lisp_Object hook; | 1995 | Lisp_Object hook; |
| 1996 | int exit_code; | ||
| 1996 | 1997 | ||
| 1997 | GCPRO1 (arg); | 1998 | GCPRO1 (arg); |
| 1998 | 1999 | ||
| @@ -2017,7 +2018,10 @@ all of which are called before Emacs is actually killed. */) | |||
| 2017 | if (STRINGP (Vauto_save_list_file_name)) | 2018 | if (STRINGP (Vauto_save_list_file_name)) |
| 2018 | unlink (SSDATA (Vauto_save_list_file_name)); | 2019 | unlink (SSDATA (Vauto_save_list_file_name)); |
| 2019 | 2020 | ||
| 2020 | exit (INTEGERP (arg) ? XINT (arg) : EXIT_SUCCESS); | 2021 | exit_code = EXIT_SUCCESS; |
| 2022 | if (noninteractive && fflush (stdout)) | ||
| 2023 | exit_code = EXIT_FAILURE; | ||
| 2024 | exit (INTEGERP (arg) ? XINT (arg) : exit_code); | ||
| 2021 | } | 2025 | } |
| 2022 | 2026 | ||
| 2023 | 2027 | ||