1 To: vim_dev@googlegroups.com
4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
11 Problem: When using any interface language when Vim is waiting for a child
12 process it gets confused by a child process started through the
14 Solution: Always used waitpid() instead of wait(). (Yasuhiro Matsumoto)
18 *** ../vim-7.3.498/src/os_unix.c 2012-02-05 22:51:27.000000000 +0100
19 --- src/os_unix.c 2012-04-20 15:47:17.000000000 +0200
23 while (wait_pid != child)
25 ! # ifdef _THREAD_SAFE
26 ! /* Ugly hack: when compiled with Python threads are probably
27 ! * used, in which case wait() sometimes hangs for no obvious
28 ! * reason. Use waitpid() instead and loop (like the GUI). */
30 wait_pid = wait4(child, status, WNOHANG, (struct rusage *)0);
32 wait_pid = waitpid(child, status, WNOHANG);
36 /* Wait for 1/100 sec before trying again. */
41 - wait_pid = wait(status);
48 while (wait_pid != child)
50 ! /* When compiled with Python threads are probably used, in which case
51 ! * wait() sometimes hangs for no obvious reason. Use waitpid()
52 ! * instead and loop (like the GUI). Also needed for other interfaces,
53 ! * they might call system(). */
55 wait_pid = wait4(child, status, WNOHANG, (struct rusage *)0);
57 wait_pid = waitpid(child, status, WNOHANG);
61 /* Wait for 1/100 sec before trying again. */
68 *** ../vim-7.3.498/src/version.c 2012-04-20 13:46:02.000000000 +0200
69 --- src/version.c 2012-04-20 15:54:05.000000000 +0200
73 { /* Add new patch number below this line */
79 It's not hard to meet expenses, they're everywhere.
81 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
82 /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
83 \\\ an exciting new programming language -- http://www.Zimbu.org ///
84 \\\ help me help AIDS victims -- http://ICCF-Holland.org ///