[PATCH] fix race in blocking send_io/recv_io
|ruby -v:||ruby 1.9.3dev (2011-03-28 trunk 31195) [x86_64-linux]||Backport:|
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 Updated by Eric Wong about 4 years ago
I managed to get a reproducible test case working on a machine I have access to.
#2 Updated by Eric Wong almost 4 years ago
Eric Wong email@example.com 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