strange select() and recvfrom() behaviour

Marcell Missura missura@cs.uni-bonn.de
Thu Oct 25 13:07:00 GMT 2007


> Maybe you were also a little quick with your code. You don't really
> test what's going on, so your code is going crazy.

It demonstrates the difference in the behaviour of this select(),
recvfrom(), send() construct under linux and windows fairly well doesn't
it. I apologize if my unsophisticated skills are causing you extra trouble
and work, but I hope you don't mind me pointing at this issue and wonder
where it's coming from.


> recvfrom() returns with -1 and errno (which you never
> test) set to ECONNRESET.

Just to add my humble two cents, I find the behaviour on linux more
intuitive, because there is no connection when you use UDP so I don't see
what connection could have been reset. I also find it weird that after an
error occured select() returns and tells you that the socket has something
to _read_. After reading the documentation I thought this is what the
error fd_set was there for.

Marcell


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/



More information about the Cygwin mailing list