From: Francis Cianfrocca Date: 2006-05-21T08:40:46+09:00 Subject: sysread changes behavior in the presence of threads? ------=_Part_178252_20007678.1148168443328 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline What am I missing here? require 'socket' require 'fcntl' Thread.new {sleep 100} sd =3D TCPsocket.new( "www.cisco.com", 80) m =3D sd.fcntl( Fcntl::F_GETFL, 0) sd.fcntl( Fcntl::F_SETFL, Fcntl::O_NONBLOCK | m) sd.sysread(4096) This code blocks in the sysread, in effect ignoring the nonblocking mode se= t on the file descriptor. But if you comment out the line that spins the thread, the sysread raises Errno::EAGAIN as you'd expect. Is this a defined behavior or a bug? ------=_Part_178252_20007678.1148168443328--