Reverted WaitForSingleObject for event handles to retry the select upon receiving an EINTR error
This commit is contained in:
parent
5906efc5f7
commit
2ec493d094
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user