diff options
author | Bram Moolenaar <Bram@vim.org> | 2016-05-08 13:21:12 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2016-05-08 13:21:12 +0200 |
commit | 36e0f7da9bc4a6ee8a7b17df503542a339e034c8 (patch) | |
tree | c724a87a4a1873b11998d7524511b8873803d389 /src | |
parent | d9db8b448c214eb583e84c598bca0688b9202ba7 (diff) | |
download | vim-36e0f7da9bc4a6ee8a7b17df503542a339e034c8.zip |
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/channel.c | 6 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/channel.c b/src/channel.c index 444599c7c..e9a44e66c 100644 --- a/src/channel.c +++ b/src/channel.c @@ -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; } @@ -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" */ } } diff --git a/src/version.c b/src/version.c index f494c223b..6ee3c96d0 100644 --- a/src/version.c +++ b/src/version.c @@ -754,6 +754,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1824, +/**/ 1823, /**/ 1822, |