Handle EINTR in ix::poll on Unix

This commit is contained in:
Benjamin Sergeant 2020-11-16 10:14:59 -08:00
parent ea32c0e1ec
commit fcf114e2b2

View File

@ -114,16 +114,13 @@ namespace ix
//
// The style from libuv is as such.
//
// int ret = -1;
// do
// {
// ret = ::poll(fds, nfds, timeout);
// }
// while (ret == -1 && errno == EINTR);
// return ret;
//
int ret = -1;
do
{
ret = ::poll(fds, nfds, timeout);
} while (ret == -1 && errno == EINTR);
return ::poll(fds, nfds, timeout);
return ret;
#endif
}