Handle EINTR in ix::poll on Unix
This commit is contained in:
parent
ea32c0e1ec
commit
fcf114e2b2
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user