Patch 7.4.1350
Problem:    When the test server fails to start Vim hangs.
Solution:   Check that there is actually something to read from the tty fd.
Files:      src/os_unix.c


*** ../vim-7.4.1349/src/os_unix.c       2016-02-16 21:02:17.603873545 +0100
--- src/os_unix.c       2016-02-17 21:44:28.298370554 +0100
***************
*** 5345,5355 ****
  #if defined(__BEOS__)
      int
  #else
!     static  int
  #endif
  RealWaitForChar(int fd, long msec, int *check_for_gpm UNUSED)
  {
      int               ret;
  #if defined(FEAT_XCLIPBOARD) || defined(USE_XSMP) || defined(FEAT_MZSCHEME)
      static int        busy = FALSE;
  
--- 5345,5356 ----
  #if defined(__BEOS__)
      int
  #else
!     static int
  #endif
  RealWaitForChar(int fd, long msec, int *check_for_gpm UNUSED)
  {
      int               ret;
+     int               result;
  #if defined(FEAT_XCLIPBOARD) || defined(USE_XSMP) || defined(FEAT_MZSCHEME)
      static int        busy = FALSE;
  
***************
*** 5466,5471 ****
--- 5467,5475 ----
  #endif
  
        ret = poll(fds, nfd, towait);
+ 
+       result = ret > 0 && (fds[0].revents & POLLIN);
+ 
  # ifdef FEAT_MZSCHEME
        if (ret == 0 && mzquantum_used)
            /* MzThreads scheduling is required and timeout occurred */
***************
*** 5613,5618 ****
--- 5617,5626 ----
  # endif
  
        ret = select(maxfd + 1, &rfds, NULL, &efds, tvp);
+       result = ret > 0 && FD_ISSET(fd, &rfds);
+       if (result)
+           --ret;
+ 
  # ifdef EINTR
        if (ret == -1 && errno == EINTR)
        {
***************
*** 5733,5739 ****
  #endif
      }
  
!     return (ret > 0);
  }
  
  #ifndef NO_EXPANDPATH
--- 5741,5747 ----
  #endif
      }
  
!     return result;
  }
  
  #ifndef NO_EXPANDPATH
*** ../vim-7.4.1349/src/version.c       2016-02-18 21:19:17.137343416 +0100
--- src/version.c       2016-02-18 22:16:40.781819321 +0100
***************
*** 749,750 ****
--- 749,752 ----
  {   /* Add new patch number below this line */
+ /**/
+     1350,
  /**/

-- 
Back up my hard drive?  I can't find the reverse switch!

 /// 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