This is the mail archive of the
mailing list for the Cygwin project.
Re: select.cc exitsock error cleanup
On 5/23/06, Christopher Faylor wrote:
I've checked in a variation of this patch but I've used si->exitsock
I'm sure that's wrong. With your version, the next time select() is
called, the thread-local socket will still look like a valid socket,
even though it has been closed and can't be used. Thus, no further
select()ing may be done on sockets from that thread.
Hmm. Also, the proper error return value appears to be 0, not -1.
So try this version. (I kept si->exitsock in there for good measure --
maybe it'll help someone stepping through with a debugger one day,
2006-05-23 Lev Bishop <email@example.com>
* select.cc (start_thread_socket): Really clean up exitsock in
case of error. Return correct error return value.