Ping PR libgcj/15430
David Daney
ddaney@avtrex.com
Tue Nov 15 17:19:00 GMT 2005
Andrew Haley wrote:
> David Daney writes:
> > Andrew Haley wrote:
> > > David Daney writes:
> > > > It has been about a week since I posted my patch for PR libgcj/15430:
> > > >
> > > > http://gcc.gnu.org/ml/java-patches/2005-q4/msg00179.html
> > > >
> > > > I know that there is a small problem of code formatting (curly brace on
> > > > wrong line) and a misleading comment. But other than that I think it is
> > > > a good patch.
> > > >
> > > > OK to commit if I fix the formatting/comment problems?
> > >
> > > Sure, it seems OK.
> > >
> > > Does it fix the bug in general, though? What about reads from things
> > > that aren't sockets?
> >
> > The only bug that is fixed by the patch is libgcj/15430 which relates
> > only to java.net.ServerSocket objects.
>
> The title of that bug is "Cannot interrupt blocking I/O calls with
> close()". This strongly suggests to me that it does not only relate
> to java.net.ServerSocket objects. The test case is an example of the
> bug, not the only possible instance of it.
>
I am not sure if there is a general specification about what should
happen to threads that are blocked when the object they are blocking in
is closed. The documentation for InputStream and OutputStream don't
consider this case, although in the name of consistency with
ServerSocket probably throwing an IOException of some type is appropriate.
> > It is possible that DatagramSockets and things in java.nio.channels.*
> > are effected by the same problem, but the patch does not address any
> > potential problems in those classes.
> >
> > I suppose that System.in could experience similar problems, but I have
> > not tried to address that with the patch either.
> >
> > Things that are not sockets but that can block have to be handled on a
> > case by case basis. Probably there are problems in the HTTP handlers
> > that will be imported as part of classpath 0.19 in this area.
> >
> > The patch fixes a specific bug. The fact that it does not fix all bugs
> > should not prevent it from being applied.
>
> Surely not, no. Please commit the patch.
Thanks.
David Daney
More information about the Java-patches
mailing list