From 061c2d683fae03b63872c08f6c4db37f930bb3b7 Mon Sep 17 00:00:00 2001 From: Po Lu Date: Fri, 27 May 2022 08:12:52 +0800 Subject: [PATCH] Fix longjmp/siglongjmp mixup * src/xterm.c (xm_drag_window_io_error_handler) (x_dnd_io_error_handler): Use `siglongjmp'. Reported by Ken Brown . --- src/xterm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/xterm.c b/src/xterm.c index d949439d188..2c50b508151 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -1157,7 +1157,7 @@ static unsigned int x_dnd_keyboard_state; /* jmp_buf that gets us out of the IO error handler if an error occurs terminating DND as part of the display disconnect handler. */ -static jmp_buf x_dnd_disconnect_handler; +static sigjmp_buf x_dnd_disconnect_handler; /* Structure describing a single window that can be the target of drag-and-drop operations. */ @@ -1612,7 +1612,7 @@ xm_drag_window_io_error_handler (Display *dpy) { /* DPY isn't created through GDK, so it doesn't matter if we don't crash here. */ - longjmp (x_dnd_disconnect_handler, 1); + siglongjmp (x_dnd_disconnect_handler, 1); } static Window @@ -2830,7 +2830,7 @@ x_dnd_io_error_handler (Display *display) #ifdef USE_GTK emacs_abort (); #else - longjmp (x_dnd_disconnect_handler, 1); + siglongjmp (x_dnd_disconnect_handler, 1); #endif } -- 2.39.2