Reverted WaitForSingleObject for event handles to retry the select upon receiving an EINTR error

This commit is contained in:
Mike McDonald 2014-08-21 08:21:29 -04:00
parent 5906efc5f7
commit 2ec493d094

View File

@ -272,8 +272,12 @@ DWORD WaitForSingleObject(HANDLE hHandle, DWORD dwMilliseconds)
timeout.tv_usec = (dwMilliseconds % 1000) * 1000;
}
status = select(event->pipe_fd[0] + 1, &rfds, NULL, NULL,
(dwMilliseconds == INFINITE) ? NULL : &timeout);
do
{
status = select(event->pipe_fd[0] + 1, &rfds, NULL, NULL,
(dwMilliseconds == INFINITE) ? NULL : &timeout);
}
while (status < 0 && (errno == EINTR));
if (status < 0)
{