summaryrefslogtreecommitdiff
path: root/src/frame.c
diff options
context:
space:
mode:
authorJan Djärv <jan.h.d@swipnet.se>2013-09-29 12:21:58 +0200
committerJan Djärv <jan.h.d@swipnet.se>2013-09-29 12:21:58 +0200
commitcaa50be230ca9313be276a7a48bba2417ed3e573 (patch)
treefc88e9a4de8737be05d547c11d67914b15846db3 /src/frame.c
parentd3e2acb659b1ff5a7e71bceb960af75f33a9ee39 (diff)
* frame.c (delete_frame): Block/unblock input to overcome race
condition. Fixes: debbugs:15475
Diffstat (limited to 'src/frame.c')
-rw-r--r--src/frame.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/frame.c b/src/frame.c
index f7ba23401c..6041253e87 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.) */