Urabe Shyouhei <shyouhei / ruby-lang.org> wrote:
> So when you  do a read loop,  nothing bothers you, as long  as you use
> readpartial.

That use of select + readpartial is unsafe.  Spurious wakeup is a
documented behavior of the select() system call, data can be received
but checksums can be incorrect and data is discarded (after process is
woken up from select()).

Calling IO#nread (from io/wait) before IO#readpartial /may/ be OK, but
I'm not sure how portable that is.

-- 
Eric Wong