problems with read()
Hi!
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
allocated memory and max-longitud-1 is long. I've casted all to their man
specifications to no avail.
Does anybody know what's going here?
TIA!
Salutacions, Pere ---- __o Ultima Ratio Regum
2:343/108.91 ----- _`\<;_ mailto:pere@casal.upc.es
PGP key available --- (_)/ (_) http://casal.upc.es/~pere/
Reply to: