emacs-diffs
[Top][All Lists]
Advanced

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

master 760fd43082: Fix rare crash when async input happens while creatin


From: Po Lu
Subject: master 760fd43082: Fix rare crash when async input happens while creating xm drag window
Date: Thu, 2 Jun 2022 04:36:25 -0400 (EDT)

branch: master
commit 760fd43082975ba9400d846b87e2016f43e98c85
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>

    Fix rare crash when async input happens while creating xm drag window
    
    * src/xterm.c (xm_get_drag_window): Work around XCloseDisplay
    freezing upon being interrupted by a signal.
---
 src/xterm.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/xterm.c b/src/xterm.c
index f280fea4cb..d0aa8874b6 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -1744,7 +1744,12 @@ xm_get_drag_window (struct x_display_info *dpyinfo)
                           (unsigned char *) &drag_window, 1);
        }
 
+      /* FIXME: why does XCloseDisplay hang if SIGIO arrives and there
+        are multiple displays? */
+      unrequest_sigio ();
       XCloseDisplay (temp_display);
+      request_sigio ();
+
       XSetErrorHandler (old_handler);
       XSetIOErrorHandler (old_io_handler);
 



reply via email to

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