From: Chris Hanson Date: Sat, 16 Mar 2019 05:15:58 +0000 (-0700) Subject: Remove cleverness for SIGTERM and SIGHUP. X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=c17f66f7924dc2008228891bf0e6997606926b4f;p=mit-scheme.git 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. --- 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