Skip to content
Snippets Groups Projects
Commit 31fff546 authored by Moe Jette's avatar Moe Jette
Browse files

Modify srun to forward SIGTERM.

parent 451eb350
No related branches found
No related tags found
No related merge requests found
...@@ -11,6 +11,7 @@ documents those changes that are of interest to users and admins. ...@@ -11,6 +11,7 @@ documents those changes that are of interest to users and admins.
at termination at termination
-- set job's start_time and end_time = now rather than leaving zero if -- set job's start_time and end_time = now rather than leaving zero if
they fail to execute they fail to execute
-- modify srun to forward SIGTERM
* Changes in SLURM 0.4.0-pre4 * Changes in SLURM 0.4.0-pre4
============================= =============================
......
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
* Static list of signals to block in srun: * Static list of signals to block in srun:
*/ */
static int srun_sigarray[] = { static int srun_sigarray[] = {
SIGINT, SIGQUIT, SIGTSTP, SIGCONT, SIGINT, SIGQUIT, SIGTSTP, SIGCONT, SIGTERM,
SIGALRM, SIGUSR1, SIGUSR2, SIGPIPE, 0 SIGALRM, SIGUSR1, SIGUSR2, SIGPIPE, 0
}; };
...@@ -102,7 +102,6 @@ sig_setup_sigmask(void) ...@@ -102,7 +102,6 @@ sig_setup_sigmask(void)
if (xsignal_block(srun_sigarray) < 0) if (xsignal_block(srun_sigarray) < 0)
return SLURM_ERROR; return SLURM_ERROR;
xsignal(SIGTERM, &_sigterm_handler);
xsignal(SIGHUP, &_sigterm_handler); xsignal(SIGHUP, &_sigterm_handler);
return SLURM_SUCCESS; return SLURM_SUCCESS;
...@@ -182,9 +181,6 @@ fwd_signal(job_t *job, int signo) ...@@ -182,9 +181,6 @@ fwd_signal(job_t *job, int signo)
static void static void
_sigterm_handler(int signum) _sigterm_handler(int signum)
{ {
if (signum == SIGTERM) {
pthread_exit(0);
}
} }
static void static void
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment