]> granicus.if.org Git - vim/commitdiff
patch 7.4.1824 v7.4.1824
authorBram Moolenaar <Bram@vim.org>
Sun, 8 May 2016 11:21:12 +0000 (13:21 +0200)
committerBram Moolenaar <Bram@vim.org>
Sun, 8 May 2016 11:21:12 +0000 (13:21 +0200)
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.

src/channel.c
src/version.c

index 444599c7c2812406a45d5731d9587bf70dd89769..e9a44e66c1c7c2c34ff7098faf69ccab1de37937 100644 (file)
@@ -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" */
        }
     }
index f494c223b414ca6824ccb8601844968fdeafc07d..6ee3c96d0feaa403810802b5f2a76eddef506758 100644 (file)
@@ -753,6 +753,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1824,
 /**/
     1823,
 /**/