This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: Socket's close() doesn't close connection (old bug?)
- From: Tom Tromey <tromey at redhat dot com>
- To: Martin Egholm Nielsen <martin at egholm-nielsen dot dk>
- Cc: java at gcc dot gnu dot org
- Date: 08 Nov 2005 11:51:27 -0700
- Subject: Re: Socket's close() doesn't close connection (old bug?)
- References: <dkqf0k$q5g$1@sea.gmane.org> <dkqh9i$3fr$1@sea.gmane.org>
- Reply-to: tromey at redhat dot com
>>>>> "Martin" == Martin Egholm Nielsen <martin@egholm-nielsen.dk> writes:
>> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15430
Martin> So I guess it's only a matter of interrupting any blocking thread when
Martin> close() is invoked - then everything will be good?!
I've always thought this bug to be rather strange, as I would have
expected the kernel to notify all read()ers on an fd that was closed
out from under them. Most likely this just points out some flaw in my
understanding though.
I wonder whether using select before the read would help.
Otherwise, yeah, maybe what we need is to keep track of the threads
blocking on an fd and interrupt them. This just seems so gross.
Tom