From: Po Lu Date: Thu, 2 Jun 2022 08:36:03 +0000 (+0800) Subject: Fix rare crash when async input happens while creating xm drag window X-Git-Tag: emacs-29.0.90~1910^2~284 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=760fd43082975ba9400d846b87e2016f43e98c85;p=emacs.git 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. --- diff --git a/src/xterm.c b/src/xterm.c index f280fea4cb9..d0aa8874b6b 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);