aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThiago de Arruda <tpadilha84@gmail.com>2015-02-23 12:30:36 -0300
committerThiago de Arruda <tpadilha84@gmail.com>2015-02-23 21:43:33 -0300
commit0b8d3cb5074031d04ad3def786775853e67ecfbe (patch)
tree1670be8fbd0afe9fb2ce431a95064c3fe1de3a55
parentd28011ee1c1e6d20babde5aeda96b6ba58897c9a (diff)
downloadrneovim-0b8d3cb5074031d04ad3def786775853e67ecfbe.tar.gz
rneovim-0b8d3cb5074031d04ad3def786775853e67ecfbe.tar.bz2
rneovim-0b8d3cb5074031d04ad3def786775853e67ecfbe.zip
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.
-rw-r--r--src/nvim/os/job.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/nvim/os/job.c b/src/nvim/os/job.c
index 8db5e3cc39..33429b364f 100644
--- a/src/nvim/os/job.c
+++ b/src/nvim/os/job.c
@@ -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);
}
}