[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Socket#read raising Errno::EINTR

Bryan Richardson

4/7/2009 6:48:00 AM

Hello all,

I've got some socket code that is causing me some headaches. I create a
socket, write to it, then wait for the server to respond back. See
below:

@conn = TCPSocket.new(@host,@port)
@conn.write(some_string)
@conn.read(7) <-- I always expect the server to return 7 bytes of data
back

When I get to @conn.read(7), it throws an Errno::EINTR - 'Interrupted
system call' exception. Anyone know what's causing this?!

--
Thanks!
Bryan
--
Posted via http://www.ruby-....

1 Answer

Loga Ganesan

4/7/2009 7:23:00 AM

0

Bryan Richardson wrote:
> Hello all,
>
> I've got some socket code that is causing me some headaches. I create a
> socket, write to it, then wait for the server to respond back. See
> below:
>
> @conn = TCPSocket.new(@host,@port)
> @conn.write(some_string)
> @conn.read(7) <-- I always expect the server to return 7 bytes of data
> back
>
> When I get to @conn.read(7), it throws an Errno::EINTR - 'Interrupted
> system call' exception. Anyone know what's causing this?!
>
> --
> Thanks!
> Bryan

It works for me. Can u send your actual server and client program , so
that I
could help you.
--
Posted via http://www.ruby-....