From: Jan Djärv Date: Sun, 29 Sep 2013 10:21:58 +0000 (+0200) Subject: * frame.c (delete_frame): Block/unblock input to overcome race X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~387^2~1429 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=caa50be230ca9313be276a7a48bba2417ed3e573;p=emacs.git * frame.c (delete_frame): Block/unblock input to overcome race condition. Fixes: debbugs:15475 --- diff --git a/src/ChangeLog b/src/ChangeLog index 0316ca1d2f2..bab050fbfbe 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2013-09-29 Jan Djärv + + * frame.c (delete_frame): Block/unblock input to overcome race + condition (Bug#15475). + 2013-09-29 Andreas Politz (tiny change) * frame.c (delete_frame): Record selected frame only after diff --git a/src/frame.c b/src/frame.c index f7ba23401ce..6041253e87f 100644 --- a/src/frame.c +++ b/src/frame.c @@ -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.) */