Patch 7.4.2282
Problem: When a child process is very fast waiting 10 msec for it is
noticeable. (Ramel Eshed)
Solution: Start waiting for 1 msec and gradually increase.
Files: src/os_unix.c
*** ../vim-7.4.2281/src/os_unix.c 2016-08-17 21:31:54.441870400 +0200
--- src/os_unix.c 2016-08-28 16:36:36.487852289 +0200
***************
*** 3934,3939 ****
--- 3934,3940 ----
wait4pid(pid_t child, waitstatus *status)
{
pid_t wait_pid = 0;
+ long delay_msec = 1;
while (wait_pid != child)
{
***************
*** 3948,3955 ****
# endif
if (wait_pid == 0)
{
! /* Wait for 10 msec before trying again. */
! mch_delay(10L, TRUE);
continue;
}
if (wait_pid <= 0
--- 3949,3958 ----
# endif
if (wait_pid == 0)
{
! /* Wait for 1 to 10 msec before trying again. */
! mch_delay(delay_msec, TRUE);
! if (++delay_msec > 10)
! delay_msec = 10;
continue;
}
if (wait_pid <= 0
***************
*** 4929,4934 ****
--- 4932,4939 ----
# if defined(FEAT_XCLIPBOARD) && defined(FEAT_X11)
else
{
+ long delay_msec = 1;
+
/*
* Similar to the loop above, but only handle X events, no
* I/O.
***************
*** 4961,4967 ****
/* Handle any X events, e.g. serving the clipboard. */
clip_update();
! mch_delay(10L, TRUE);
}
}
# endif
--- 4966,4976 ----
/* Handle any X events, e.g. serving the clipboard. */
clip_update();
! /* Wait for 1 to 10 msec. 1 is faster but gives the child
! * less time. */
! mch_delay(delay_msec, TRUE);
! if (++delay_msec > 10)
! delay_msec = 10;
}
}
# endif
*** ../vim-7.4.2281/src/version.c 2016-08-28 16:06:01.411721802 +0200
--- src/version.c 2016-08-28 16:37:21.091467583 +0200
***************
*** 765,766 ****
--- 765,768 ----
{ /* Add new patch number below this line */
+ /**/
+ 2282,
/**/
--
A fool learns from his mistakes, a wise man from someone else's.
/// 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.