Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Socket#read raising Errno::EINTR

Reply
Thread Tools

Socket#read raising Errno::EINTR

 
 
Bryan Richardson
Guest
Posts: n/a
 
      04-07-2009
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-forum.com/.

 
Reply With Quote
 
 
 
 
Loga Ganesan
Guest
Posts: n/a
 
      04-07-2009
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-forum.com/.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help raising events David Smith ASP .Net 0 12-08-2003 05:30 AM
raising events! David Smith ASP .Net 0 12-05-2003 12:51 PM
Raising BubleEvents Robert Brinson ASP .Net 0 08-29-2003 03:07 PM
Re: raising event Kevin Spencer ASP .Net 0 07-31-2003 02:26 PM
Raising an Event via Code Dane Dickey ASP .Net 2 07-01-2003 07:18 AM



Advertisments