mirror of
https://github.com/vim/vim.git
synced 2025-09-26 04:04:07 -04:00
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.
This commit is contained in:
@@ -5350,6 +5350,7 @@ WaitForChar(long msec)
|
|||||||
RealWaitForChar(int fd, long msec, int *check_for_gpm UNUSED)
|
RealWaitForChar(int fd, long msec, int *check_for_gpm UNUSED)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
int result;
|
||||||
#if defined(FEAT_XCLIPBOARD) || defined(USE_XSMP) || defined(FEAT_MZSCHEME)
|
#if defined(FEAT_XCLIPBOARD) || defined(USE_XSMP) || defined(FEAT_MZSCHEME)
|
||||||
static int busy = FALSE;
|
static int busy = FALSE;
|
||||||
|
|
||||||
@@ -5466,6 +5467,9 @@ RealWaitForChar(int fd, long msec, int *check_for_gpm UNUSED)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
ret = poll(fds, nfd, towait);
|
ret = poll(fds, nfd, towait);
|
||||||
|
|
||||||
|
result = ret > 0 && (fds[0].revents & POLLIN);
|
||||||
|
|
||||||
# ifdef FEAT_MZSCHEME
|
# ifdef FEAT_MZSCHEME
|
||||||
if (ret == 0 && mzquantum_used)
|
if (ret == 0 && mzquantum_used)
|
||||||
/* MzThreads scheduling is required and timeout occurred */
|
/* MzThreads scheduling is required and timeout occurred */
|
||||||
@@ -5613,6 +5617,10 @@ select_eintr:
|
|||||||
# endif
|
# endif
|
||||||
|
|
||||||
ret = select(maxfd + 1, &rfds, NULL, &efds, tvp);
|
ret = select(maxfd + 1, &rfds, NULL, &efds, tvp);
|
||||||
|
result = ret > 0 && FD_ISSET(fd, &rfds);
|
||||||
|
if (result)
|
||||||
|
--ret;
|
||||||
|
|
||||||
# ifdef EINTR
|
# ifdef EINTR
|
||||||
if (ret == -1 && errno == EINTR)
|
if (ret == -1 && errno == EINTR)
|
||||||
{
|
{
|
||||||
@@ -5733,7 +5741,7 @@ select_eintr:
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
return (ret > 0);
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef NO_EXPANDPATH
|
#ifndef NO_EXPANDPATH
|
||||||
|
@@ -747,6 +747,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
1350,
|
||||||
/**/
|
/**/
|
||||||
1349,
|
1349,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user