0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

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)
This commit is contained in:
Bram Moolenaar
2016-11-17 17:25:32 +01:00
parent c0514bf477
commit 7df915d113
7 changed files with 122 additions and 59 deletions

View File

@@ -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;