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 -- [email protected] -- 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    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui