Subject: bug#11049: [PATCH v2] Block input to prevent crash on SIGHUP (bug#11049)

From: Alan Third <[email-masked]>
Date: Sat, 28 May 2016 15:00:11 +0100

* src/emacs.c (Fkill-emacs): Block input while exiting.
---
 src/emacs.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/emacs.c b/src/emacs.c
index 3e0cf59..fb01573 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -1941,6 +1941,13 @@ all of which are called before Emacs is actually killed.  */
   x_clipboard_manager_save_all ();
 #endif
 
+#ifdef HAVE_NS
+  /* Crashes trying to process input while quitting. I'm not bothering
+     to unblock input since, well, we're quitting. If an unblock_input
+     is required it will have to go after Fexpand_file_name below. */
+  block_input();
+#endif
+
   shut_down_emacs (0, (STRINGP (arg) && !feof (stdin)) ? arg : Qnil);
 
 #ifdef HAVE_NS
-- 

Helps if I attach a patch that doesn't break the build.

-- 
Alan Third