[PATCH] fix race in blocking send_io/recv_io
There is no need to call select() before entering a blocking I/O
region since other threads may run. select() cannot guarantee
readability if the IO is shared across different
threads/processes. Furthermore, we actually need to select() on
EAGAIN/EINTR since the functions are intended to be blocking so
we move the select() calls into the retry loop.
#1 [ruby-core:35575] Updated by Eric Wong almost 5 years ago
I managed to get a reproducible test case working on a machine I have access to.
#2 [ruby-core:36008] Updated by Eric Wong almost 5 years ago
Eric Wong firstname.lastname@example.org wrote:
Btw, this was pushed this out to my git repo for convenience, I've
just rebased and repushed:
git pull git://bogomips.org/ruby fix-unix-send-recv-io
I really look forward to this fix getting into trunk and backported to