]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix rare crash when async input happens while creating xm drag window
authorPo Lu <luangruo@yahoo.com>
Thu, 2 Jun 2022 08:36:03 +0000 (16:36 +0800)
committerPo Lu <luangruo@yahoo.com>
Thu, 2 Jun 2022 08:36:15 +0000 (16:36 +0800)
* src/xterm.c (xm_get_drag_window): Work around XCloseDisplay
freezing upon being interrupted by a signal.

src/xterm.c

index f280fea4cb903b3569b53cd38d1a278b6ffba1b1..d0aa8874b6b4370f5345520f6d1097bcb824f937 100644 (file)
@@ -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);