Handle EINTR when polling.

This commit is contained in:
Ulrich Czekalla 2004-08-10 23:42:36 +00:00 committed by Alexandre Julliard
parent c8c4bf30fb
commit 842320998a
1 changed files with 7 additions and 1 deletions

View File

@ -589,7 +589,13 @@ static inline int do_block( int fd, int events )
pfd.fd = fd;
pfd.events = events;
poll(&pfd, 1, -1);
while (poll(&pfd, 1, -1) < 0)
{
if (errno != EINTR)
return -1;
}
return pfd.revents;
}