From: Daniel Berger Date: 2003-05-02T05:07:16+09:00 Subject: Errno::EPIPE being caused by $DEBUG Hi all, Solaris 9 Ruby 1.6.8 and 1.8.0p2 I noticed that when I run a TCPServer in debug mode, I hit Errno::EPIPE errors. Here are a couple quick scripts you can verify with - just start the server in one terminal (with -d), then run the client in another: # tcpserv.rb require "socket" t = TCPServer.new("localhost",8888) addr = t.addr addr.shift while true Thread.start(t.accept) do |s| while x = s.gets puts "Got: " + x s.puts(x) end end end # tcpclient.rb require "socket" s = TCPSocket.new("localhost",8888) 1.upto(100){ s.puts("Hello","World") rv = s.gets puts "Received: #{rv}" } s.close Running this code in standard mode seems to work fine, however. I tried: trap("PIPE","IGNORE") but that didn't seem to do anything. Should I use some other trap code? Is this a bug? Regards, Dan -- a = [74, 117, 115, 116, 32, 65, 110, 111, 116, 104, 101, 114, 32, 82] a.push(117,98, 121, 32, 72, 97, 99, 107, 101, 114) puts a.pack("C*")