summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2012-04-20 15:55:16 +0200
committerBram Moolenaar <Bram@vim.org>2012-04-20 15:55:16 +0200
commit6be120e7f5cfe9c23fbcd964038bdbc9f626906c (patch)
tree1fa3d9c13ed1549d473c38e6a3e37d3feecb0a8f
parent84298db3a43838da9ca2c7289fbe34428604fec4 (diff)
downloadvim-git-6be120e7f5cfe9c23fbcd964038bdbc9f626906c.tar.gz
updated for version 7.3.499v7.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)
-rw-r--r--src/os_unix.c17
-rw-r--r--src/version.c2
2 files changed, 9 insertions, 10 deletions
diff --git a/src/os_unix.c b/src/os_unix.c
index 043d0a800..860fbcc40 100644
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -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
diff --git a/src/version.c b/src/version.c
index ed92464a4..df3717ab9 100644
--- a/src/version.c
+++ b/src/version.c
@@ -715,6 +715,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 499,
+/**/
498,
/**/
497,