Skip to content

Commit 36e0f7d

Browse files
committed
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.
1 parent d9db8b4 commit 36e0f7d

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

src/channel.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4144,7 +4144,7 @@ free_unused_jobs_contents(int copyID, int mask)
41444144
* recurse into Lists, Dictionaries etc. */
41454145
job_free_contents(job);
41464146
did_free = TRUE;
4147-
}
4147+
}
41484148
return did_free;
41494149
}
41504150

@@ -4234,7 +4234,7 @@ job_stop_on_exit()
42344234
}
42354235

42364236
/*
4237-
* Called once in a while: check if any jobs with an "exit_cb" have ended.
4237+
* Called once in a while: check if any jobs that seem useful have ended.
42384238
*/
42394239
void
42404240
job_check_ended(void)
@@ -4252,7 +4252,7 @@ job_check_ended(void)
42524252
for (job = first_job; job != NULL; job = next)
42534253
{
42544254
next = job->jv_next;
4255-
if (job->jv_status == JOB_STARTED && job->jv_exit_cb != NULL)
4255+
if (job->jv_status == JOB_STARTED && job_still_useful(job))
42564256
job_status(job); /* may free "job" */
42574257
}
42584258
}

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -753,6 +753,8 @@ static char *(features[]) =
753753

754754
static int included_patches[] =
755755
{ /* Add new patch number below this line */
756+
/**/
757+
1824,
756758
/**/
757759
1823,
758760
/**/

0 commit comments

Comments
 (0)