[Top][All Lists]

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

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

From: Alan Third
Subject: bug#11049: [PATCH] Block input to prevent crash on SIGHUP (bug#11049)
Date: Sat, 28 May 2016 00:01:38 +0100
User-agent: Mutt/1.5.24 (2015-08-30)

* 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..fa678b0 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 ();
+#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();
   shut_down_emacs (0, (STRINGP (arg) && !feof (stdin)) ? arg : Qnil);
 #ifdef HAVE_NS

I believe this fixes the SIGABRT that occurs when Emacs receives a

The problem appears to be that OS X likes to send input to Emacs while
it's in the middle of doing things that it really doesn't appreciate
receiving input while doing. Like minimizing, or shutting down.
Alan Third

reply via email to

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