Project

General

Profile

Bug #9356 » socket-eintr.rb

Anonymous, 01/03/2014 07:29 PM

 
require "socket"

trap "USR1" do end

Thread.start do
loop do
Process.kill :USR1, $$
sleep 0.01
end
end

sock = TCPSocket.new("charlie.bz", 80)
sock.write "GET / HTTP/1.0\r\n\r\n"
puts sock.read
(1-1/2)