diff options
author | Bram Moolenaar <Bram@vim.org> | 2016-11-17 17:25:32 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2016-11-17 17:25:32 +0100 |
commit | 7df915d113ac1981792c50e8b000c9f5f784b78b (patch) | |
tree | 873425f52305ca284850d34727534542cf8bc8e9 /src/os_unix.c | |
parent | c0514bf4777a1d55f5785b3887c5686fd0bbe870 (diff) | |
download | vim-7df915d113ac1981792c50e8b000c9f5f784b78b.zip |
patch 8.0.0087
Problem: When the channel callback gets job info the job may already have
been deleted. (lifepillar)
Solution: Do not delete the job when the channel is still useful. (ichizok,
closes #1242, closes #1245)
Diffstat (limited to 'src/os_unix.c')
-rw-r--r-- | src/os_unix.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/os_unix.c b/src/os_unix.c index 6197c3fbd..a63eb6e89 100644 --- a/src/os_unix.c +++ b/src/os_unix.c @@ -5354,7 +5354,7 @@ mch_job_status(job_T *job) return "run"; return_dead: - if (job->jv_status != JOB_ENDED) + if (job->jv_status < JOB_ENDED) { ch_log(job->jv_channel, "Job ended"); job->jv_status = JOB_ENDED; @@ -5398,7 +5398,7 @@ mch_detect_ended_job(job_T *job_list) job->jv_exitval = WEXITSTATUS(status); else if (WIFSIGNALED(status)) job->jv_exitval = -1; - if (job->jv_status != JOB_ENDED) + if (job->jv_status < JOB_ENDED) { ch_log(job->jv_channel, "Job ended"); job->jv_status = JOB_ENDED; |