]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix race conditions with async input in some Haiku dialogs
authorPo Lu <luangruo@yahoo.com>
Mon, 2 May 2022 01:59:52 +0000 (01:59 +0000)
committerPo Lu <luangruo@yahoo.com>
Mon, 2 May 2022 01:59:52 +0000 (01:59 +0000)
* src/haikufns.c (Fhaiku_save_session_reply):
* src/haikufont.c (Fx_select_font): Block sigio around system
calls.

src/haikufns.c
src/haikufont.c

index f7c17567b184cbbb50b6eb800fe67ad7e1890803..04c58c55a76af36973f5d8f40203fdf201af1b00 100644 (file)
@@ -2672,8 +2672,10 @@ call this function yourself.  */)
   reply.quit_reply = !NILP (quit_reply);
 
   block_input ();
+  unrequest_sigio ();
   write_port (port_emacs_to_session_manager, 0, &reply,
              sizeof reply);
+  request_sigio ();
   unblock_input ();
 
   return Qnil;
index eb00c8ff3819b122318238245cf3c61b5b262889..7f676b87274a8507a8ca25d8a71cf1e6a7fe1c00 100644 (file)
@@ -1109,10 +1109,12 @@ in the font selection dialog.  */)
     error ("Trying to use a menu from within a menu-entry");
 
   popup_activated_p++;
+  unrequest_sigio ();
   rc = be_select_font (process_pending_signals,
                       haikufont_should_quit_popup,
                       &family, &style, &size,
                       !NILP (exclude_proportional));
+  request_sigio ();
   popup_activated_p--;
 
   if (!rc)