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)
diff --git a/src/os_unix.c b/src/os_unix.c
index 6197c3f..a63eb6e 100644
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -5354,7 +5354,7 @@
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 @@
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;