From c17f66f7924dc2008228891bf0e6997606926b4f Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Fri, 15 Mar 2019 22:15:58 -0700 Subject: [PATCH] Remove cleverness for SIGTERM and SIGHUP. SIGTERM shouldn't be caught; instead just leave the default behavior. SIGHUP is sent by Emacs when the *scheme* buffer is killed; it must kill the process or we're left with a detached process. --- src/microcode/uxsig.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/microcode/uxsig.c b/src/microcode/uxsig.c index 5a4547cb4..b7790218c 100644 --- a/src/microcode/uxsig.c +++ b/src/microcode/uxsig.c @@ -349,7 +349,7 @@ initialize_signal_descriptors (void) defsignal (SIGSYS, "SIGSYS", dfl_terminate, CORE_DUMP); defsignal (SIGPIPE, "SIGPIPE", dfl_terminate, 0); defsignal (SIGALRM, "SIGALRM", dfl_terminate, ASYNC); - defsignal (SIGTERM, "SIGTERM", dfl_terminate, ASYNC); + defsignal (SIGTERM, "SIGTERM", dfl_terminate, (ASYNC | NOCATCH)); defsignal (SIGUSR1, "SIGUSR1", dfl_terminate, ASYNC); defsignal (SIGUSR2, "SIGUSR2", dfl_terminate, ASYNC); defsignal (SIGABRT, "SIGABRT", dfl_terminate, (ASYNC | CORE_DUMP)); @@ -548,10 +548,7 @@ DEFUN_STD_HANDLER (sighnd_save_then_terminate, static DEFUN_STD_HANDLER (sighnd_terminate, - (termination_signal - ((! (option_emacs_subprocess && (signo == SIGHUP))) - ? (find_signal_name (signo)) - : 0))) + (termination_signal (find_signal_name (signo)))) #ifdef HAVE_SIGFPE extern void clear_float_exceptions (void); @@ -681,8 +678,6 @@ UX_initialize_signals (void) #endif bind_handler (SIGALRM, sighnd_timer); bind_handler (SIGVTALRM, sighnd_timer); - bind_handler (SIGTERM, sighnd_control_g); - bind_handler (SIGHUP, sighnd_control_g); bind_handler (SIGUSR1, sighnd_save_then_terminate); #ifdef HAVE_NICE bind_handler (SIGUSR2, sighnd_renice); @@ -696,8 +691,6 @@ UX_initialize_signals (void) { if (getenv ("USE_SCHEMATIK_STYLE_INTERRUPTS")) bind_handler (SIGHUP, sighnd_control_b); - else if (!option_emacs_subprocess) - bind_handler (SIGHUP, sighnd_save_then_terminate); if (getenv ("USE_SCHEMATIK_STYLE_INTERRUPTS")) bind_handler (SIGQUIT, sighnd_control_u); else -- 2.25.1