To: vim_dev@googlegroups.com Subject: Patch 7.4.1824 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ 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. Files: src/channel.c *** ../vim-7.4.1823/src/channel.c 2016-05-04 21:49:15.000075181 +0200 --- src/channel.c 2016-05-08 13:18:24.169944203 +0200 *************** *** 4144,4150 **** * recurse into Lists, Dictionaries etc. */ job_free_contents(job); did_free = TRUE; ! } return did_free; } --- 4144,4150 ---- * recurse into Lists, Dictionaries etc. */ job_free_contents(job); did_free = TRUE; ! } return did_free; } *************** *** 4234,4240 **** } /* ! * Called once in a while: check if any jobs with an "exit_cb" have ended. */ void job_check_ended(void) --- 4234,4240 ---- } /* ! * Called once in a while: check if any jobs that seem useful have ended. */ void job_check_ended(void) *************** *** 4252,4258 **** for (job = first_job; job != NULL; job = next) { next = job->jv_next; ! if (job->jv_status == JOB_STARTED && job->jv_exit_cb != NULL) job_status(job); /* may free "job" */ } } --- 4252,4258 ---- for (job = first_job; job != NULL; job = next) { next = job->jv_next; ! if (job->jv_status == JOB_STARTED && job_still_useful(job)) job_status(job); /* may free "job" */ } } *** ../vim-7.4.1823/src/version.c 2016-05-08 12:51:57.436135992 +0200 --- src/version.c 2016-05-08 13:20:37.336415886 +0200 *************** *** 755,756 **** --- 755,758 ---- { /* Add new patch number below this line */ + /**/ + 1824, /**/ -- To keep milk from turning sour: Keep it in the cow. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///