1
0
forked from aniani/vim

patch 7.4.1824

Problem:    When a job is no longer referenced and does not have an exit
            callback the process may hang around in defunc state. (Nicola)
Solution:   Call job_status() if the job is running and won't get freed
            because it might still be useful.
This commit is contained in:
Bram Moolenaar
2016-05-08 13:21:12 +02:00
parent d9db8b448c
commit 36e0f7da9b
2 changed files with 5 additions and 3 deletions

View File

@@ -4234,7 +4234,7 @@ job_stop_on_exit()
}
/*
* Called once in a while: check if any jobs with an "exit_cb" have ended.
* Called once in a while: check if any jobs that seem useful have ended.
*/
void
job_check_ended(void)
@@ -4252,7 +4252,7 @@ job_check_ended(void)
for (job = first_job; job != NULL; job = next)
{
next = job->jv_next;
if (job->jv_status == JOB_STARTED && job->jv_exit_cb != NULL)
if (job->jv_status == JOB_STARTED && job_still_useful(job))
job_status(job); /* may free "job" */
}
}

View File

@@ -753,6 +753,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1824,
/**/
1823,
/**/