Skip to content

Commit

Permalink
patch 7.4.1824
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
brammool committed May 8, 2016
1 parent d9db8b4 commit 36e0f7d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/channel.c
Expand Up @@ -4144,7 +4144,7 @@ free_unused_jobs_contents(int copyID, int mask)
* recurse into Lists, Dictionaries etc. */
job_free_contents(job);
did_free = TRUE;
}
}
return did_free;
}

Expand Down Expand Up @@ -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)
Expand All @@ -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" */
}
}
Expand Down
2 changes: 2 additions & 0 deletions src/version.c
Expand Up @@ -753,6 +753,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1824,
/**/
1823,
/**/
Expand Down

0 comments on commit 36e0f7d

Please sign in to comment.