From: Eric Wong Date: 2011-03-29T06:37:52+09:00 Subject: [ruby-core:35575] [Ruby 1.9 - Bug #4535] [PATCH] fix race in blocking send_io/recv_io Issue #4535 has been updated by Eric Wong. File 0002-test-socket-test_unix.rb-test-case-for-bug-4535.patch added I managed to get a reproducible test case working on a machine I have access to. ---------------------------------------- Bug #4535: [PATCH] fix race in blocking send_io/recv_io http://redmine.ruby-lang.org/issues/4535 Author: Eric Wong Status: Open Priority: Normal Assignee: Category: ext Target version: 1.9.x ruby -v: ruby 1.9.3dev (2011-03-28 trunk 31195) [x86_64-linux] 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. -- http://redmine.ruby-lang.org