0
0
mirror of https://github.com/vim/vim.git synced 2025-07-26 11:04:33 -04:00

updated for version 7.3.499

Problem:    When using any interface language when Vim is waiting for a child
            process it gets confused by a child process started through the
            interface.
Solution:   Always used waitpid() instead of wait(). (Yasuhiro Matsumoto)
This commit is contained in:
Bram Moolenaar 2012-04-20 15:55:16 +02:00
parent 84298db3a4
commit 6be120e7f5
2 changed files with 9 additions and 10 deletions

View File

@ -3734,24 +3734,21 @@ wait4pid(child, status)
while (wait_pid != child)
{
# ifdef _THREAD_SAFE
/* Ugly hack: when compiled with Python threads are probably
* used, in which case wait() sometimes hangs for no obvious
* reason. Use waitpid() instead and loop (like the GUI). */
# ifdef __NeXT__
/* When compiled with Python threads are probably used, in which case
* wait() sometimes hangs for no obvious reason. Use waitpid()
* instead and loop (like the GUI). Also needed for other interfaces,
* they might call system(). */
# ifdef __NeXT__
wait_pid = wait4(child, status, WNOHANG, (struct rusage *)0);
# else
# else
wait_pid = waitpid(child, status, WNOHANG);
# endif
# endif
if (wait_pid == 0)
{
/* Wait for 1/100 sec before trying again. */
mch_delay(10L, TRUE);
continue;
}
# else
wait_pid = wait(status);
# endif
if (wait_pid <= 0
# ifdef ECHILD
&& errno == ECHILD

View File

@ -714,6 +714,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
499,
/**/
498,
/**/