epoll: avoid race condition in EINTR checking
commit2fb791b331b286f2af86d807028818d493f0f556
authorEric Wong <normalperson@yhbt.net>
Sat, 21 May 2011 02:34:39 +0000 (20 19:34 -0700)
committerEric Wong <normalperson@yhbt.net>
Sat, 21 May 2011 02:34:39 +0000 (20 19:34 -0700)
tree656b3b61d4fcfd677de772040684e426b03bd9e0
parent96503a9d386e422ee594f8579a5a76e970c90a6c
epoll: avoid race condition in EINTR checking

Even if we timeout while getting an EINTR, we'll retry
epoll_wait() with a zero timeout like IO.select does in Ruby to
avoid raising Errno::EINTR.
ext/sleepy_penguin/epoll.c
test/test_epoll.rb