]> git.eshelyaron.com Git - emacs.git/commitdiff
* frame.c (delete_frame): Block/unblock input to overcome race
authorJan Djärv <jan.h.d@swipnet.se>
Sun, 29 Sep 2013 10:21:58 +0000 (12:21 +0200)
committerJan Djärv <jan.h.d@swipnet.se>
Sun, 29 Sep 2013 10:21:58 +0000 (12:21 +0200)
condition.

Fixes: debbugs:15475
src/ChangeLog
src/frame.c

index 0316ca1d2f2e7e75d35a4fd16ebc95b79cfef0ee..bab050fbfbe1fffbec35bab7acfc41695d5712e8 100644 (file)
@@ -1,3 +1,8 @@
+2013-09-29  Jan Djärv  <jan.h.d@swipnet.se>
+
+       * frame.c (delete_frame): Block/unblock input to overcome race
+       condition (Bug#15475).
+
 2013-09-29  Andreas Politz  <politza@hochschule-trier.de>  (tiny change)
 
        * frame.c (delete_frame): Record selected frame only after
index f7ba23401ce22cc41bf9be3f2d1b2b725ebb1e14..6041253e87f1b9f8209ef37366318f0731ad5aac 100644 (file)
@@ -1373,13 +1373,15 @@ delete_frame (Lisp_Object frame, Lisp_Object force)
      have called the window-system-dependent frame destruction
      routine.  */
 
-  if (FRAME_TERMINAL (f)->delete_frame_hook)
-    (*FRAME_TERMINAL (f)->delete_frame_hook) (f);
 
   {
+    block_input ();
+    if (FRAME_TERMINAL (f)->delete_frame_hook)
+      (*FRAME_TERMINAL (f)->delete_frame_hook) (f);
     struct terminal *terminal = FRAME_TERMINAL (f);
     f->output_data.nothing = 0;
     f->terminal = 0;             /* Now the frame is dead.  */
+    unblock_input ();
 
     /* If needed, delete the terminal that this frame was on.
        (This must be done after the frame is killed.)  */