From 31fff5463884f11db8fa74ec4554b8ffa0a1b4cd Mon Sep 17 00:00:00 2001 From: Moe Jette <jette1@llnl.gov> Date: Tue, 16 Nov 2004 19:33:20 +0000 Subject: [PATCH] Modify srun to forward SIGTERM. --- NEWS | 1 + src/srun/signals.c | 6 +----- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/NEWS b/NEWS index db33f939a86..d1f4848fdbb 100644 --- a/NEWS +++ b/NEWS @@ -11,6 +11,7 @@ documents those changes that are of interest to users and admins. at termination -- set job's start_time and end_time = now rather than leaving zero if they fail to execute + -- modify srun to forward SIGTERM * Changes in SLURM 0.4.0-pre4 ============================= diff --git a/src/srun/signals.c b/src/srun/signals.c index f052a1c3f49..4c50aebe0d7 100644 --- a/src/srun/signals.c +++ b/src/srun/signals.c @@ -52,7 +52,7 @@ * Static list of signals to block in srun: */ static int srun_sigarray[] = { - SIGINT, SIGQUIT, SIGTSTP, SIGCONT, + SIGINT, SIGQUIT, SIGTSTP, SIGCONT, SIGTERM, SIGALRM, SIGUSR1, SIGUSR2, SIGPIPE, 0 }; @@ -102,7 +102,6 @@ sig_setup_sigmask(void) if (xsignal_block(srun_sigarray) < 0) return SLURM_ERROR; - xsignal(SIGTERM, &_sigterm_handler); xsignal(SIGHUP, &_sigterm_handler); return SLURM_SUCCESS; @@ -182,9 +181,6 @@ fwd_signal(job_t *job, int signo) static void _sigterm_handler(int signum) { - if (signum == SIGTERM) { - pthread_exit(0); - } } static void -- GitLab