From: Andrea Corallo Date: Tue, 6 Aug 2019 21:56:12 +0000 (+0200) Subject: fix gcc interruption X-Git-Tag: emacs-28.0.90~2727^2~1314 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b3dc6e8f06892869e0dcf39fd226b63752ce6cf9;p=emacs.git fix gcc interruption --- diff --git a/src/comp.c b/src/comp.c index 16089beee1e..54078e89bfc 100644 --- a/src/comp.c +++ b/src/comp.c @@ -22,6 +22,7 @@ along with GNU Emacs. If not, see . */ #include #include +#include #include #include "lisp.h" @@ -2280,9 +2281,14 @@ DEFUN ("comp-compile-and-load-ctxt", Fcomp_compile_and_load_ctxt, gcc_jit_context_set_int_option (comp.ctxt, GCC_JIT_INT_OPTION_OPTIMIZATION_LEVEL, comp_speed); - /* Gcc doesn't like being interrupted. */ + /* Gcc doesn't like being interrupted at all. */ sigset_t oldset; - block_atimers (&oldset); + sigset_t blocked; + sigemptyset (&blocked); + sigaddset (&blocked, SIGALRM); + sigaddset (&blocked, SIGINT); + sigaddset (&blocked, SIGIO); + pthread_sigmask (SIG_BLOCK, &blocked, &oldset); if (COMP_DEBUG) gcc_jit_context_dump_to_file (comp.ctxt, "gcc-ctxt-dump.c", 1);