Re: problems with read()
> I'm in the need of tracing a read(). After creating a socket
> (socket+bind+listen) I make a telnet call the machine+port and after the
> first read(), the program fails at it.
>
> More exactly I get a errno that says:
> Invalid argument
>
> And the exact call is:
> cont=read(sd, line, max-longitud-1);
>
> I've tripled checked the arguments with gdb and all of them are
> what read expects. sd is the value given by bind(), line is a char * with
Since you have a server socket, "sd" should be a value returned by accept().
Alex Y.
--
_
_( )_
( (o___ +-------------------------------------------+
| _ 7 | Alexander Yukhimets |
\ (") | http://pages.nyu.edu/~aqy6633/ |
/ \ \ +-------------------------------------------+
Reply to: