From: matz@... (Yukihiro Matsumoto) Date: 2003-04-05T11:41:47+09:00 Subject: Re: gets from socket got eof (multithread) Hi, As usual I need information about your platform, your Ruby version, and preferably error reproducing script. I couldn't reproduce similar error using 1.8.0 2003-03-28. In message "gets from socket got eof (multithread)" on 03/04/02, "Shannon Fang" writes: | |Hi all, | |I have a problem here. My program used a structure similar to the following: | |@session=TCPSocket.new(mypopserver,110) |while resp=@session.gets do |blah blah |end | |It worked perfect in single user mode. While I put the code into a thread, I |encountered problem: a lot of thread got resp=nil, and jumped out of the |while loop. | |My question is: I just connected to the socket, and everything seems fine, |why gets return nil? why the socket reaches eof? Please note that in single |user mode it is ok. It might caused by your stdio behavior. matz.