Skip to content
Snippets Groups Projects
Commit 320d7532 authored by Mark Grondona's avatar Mark Grondona
Browse files

o fwd_signal() was calling in interrupt handler before force_termination

   check was made, this could result in fwd_signal() calls piling up on
   eachother and not allowing multiple ^C's to terminate job. (gnats:299)
parent eccd7d37
No related branches found
No related tags found
No related merge requests found
......@@ -200,14 +200,15 @@ _handle_intr(job_t *job, time_t *last_intr, time_t *last_intr_sent)
/* terminate job */
if (job->state < SRUN_JOB_FORCETERM) {
if ((time(NULL) - *last_intr_sent) < 1) {
job_force_termination(job);
pthread_exit(0);
}
info("sending Ctrl-C to job");
*last_intr = time(NULL);
*last_intr_sent = time(NULL);
fwd_signal(job, SIGINT);
if ((time(NULL) - *last_intr_sent) < 1)
job_force_termination(job);
else
*last_intr_sent = time(NULL);
} else {
job_force_termination(job);
}
......
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