]> git.eshelyaron.com Git - emacs.git/commitdiff
fix SIGIO hang after compilation
authorAndrea Corallo <akrl@sdf.org>
Sun, 10 Nov 2019 12:10:31 +0000 (13:10 +0100)
committerAndrea Corallo <akrl@sdf.org>
Wed, 1 Jan 2020 10:38:02 +0000 (11:38 +0100)
src/comp.c

index cce4f1d6e52066febc8bc13c6d7b5b6f7dddda47..8793f7b856c78d62821b143352af9e9a761a3d42 100644 (file)
@@ -32,6 +32,7 @@ along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.  */
 #include "window.h"
 #include "dynlib.h"
 #include "buffer.h"
+#include "blockinput.h"
 
 #define DEFAULT_SPEED 2 /* See comp-speed var.  */
 
@@ -3037,6 +3038,7 @@ DEFUN ("comp--compile-ctxt-to-file", Fcomp__compile_ctxt_to_file,
                                  GCC_JIT_INT_OPTION_OPTIMIZATION_LEVEL,
                                  comp_speed);
   /* Gcc doesn't like being interrupted at all.  */
+  block_input ();
   sigset_t oldset;
   sigset_t blocked;
   sigemptyset (&blocked);
@@ -3081,6 +3083,7 @@ DEFUN ("comp--compile-ctxt-to-file", Fcomp__compile_ctxt_to_file,
                                   SSDATA (out_file));
 
   pthread_sigmask (SIG_SETMASK, &oldset, 0);
+  unblock_input ();
 
   return out_file;
 }