[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 7932d06: Fix exit code when stdin is at EOF (Bug#19
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] master 7932d06: Fix exit code when stdin is at EOF (Bug#19897) |
Date: |
Wed, 18 Feb 2015 21:15:45 +0000 |
branch: master
commit 7932d062cf85c2c37bd15b22be30a65c034001fc
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>
Fix exit code when stdin is at EOF (Bug#19897)
src/emacs.c (Fkill_emacs): Exit with specified exit code even if
stdin is at EOF.
---
src/ChangeLog | 5 +++++
src/emacs.c | 5 +----
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/src/ChangeLog b/src/ChangeLog
index 8a3b534..1c4758f 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
+2015-02-18 Eli Zaretskii <address@hidden>
+
+ * emacs.c (Fkill_emacs): Exit with specified exit code even if
+ stdin is at EOF. (Bug#19897)
+
2015-02-18 Oscar Fuentes <address@hidden>
* keyboard.c (read_char): When there is an input method function,
diff --git a/src/emacs.c b/src/emacs.c
index fdd17d1..f933eb1 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -1896,9 +1896,6 @@ all of which are called before Emacs is actually killed.
*/
GCPRO1 (arg);
- if (feof (stdin))
- arg = Qt;
-
/* Fsignal calls emacs_abort () if it sees that waiting_for_input is
set. */
waiting_for_input = 0;
@@ -1910,7 +1907,7 @@ all of which are called before Emacs is actually killed.
*/
x_clipboard_manager_save_all ();
#endif
- shut_down_emacs (0, STRINGP (arg) ? arg : Qnil);
+ shut_down_emacs (0, (STRINGP (arg) && !feof (stdin)) ? arg : Qnil);
#ifdef HAVE_NS
ns_release_autorelease_pool (ns_pool);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 7932d06: Fix exit code when stdin is at EOF (Bug#19897),
Eli Zaretskii <=