job: Send SIGTERM before calling job_stop in job_teardown

Send sigterm immediately since it can be caught by processes. If they don't
respond and are still alive after a while, SIGKILL will be sent.
This commit is contained in:
Thiago de Arruda 2015-02-23 12:30:36 -03:00
parent d28011ee1c
commit 0b8d3cb507

View File

@ -92,6 +92,8 @@ void job_teardown(void)
for (int i = 0; i < MAX_RUNNING_JOBS; i++) {
Job *job;
if ((job = table[i]) != NULL) {
uv_kill(job->pid, SIGTERM);
job->term_sent = true;
job_stop(job);
}
}