Am Dienstag, den 05.12.2006, 10:01 +0000 schrieb Andrew Haley:
> Roman Kennke writes:
> > Hi again,
> >
> > Am Montag, den 04.12.2006, 11:19 -0800 schrieb David Daney:
> > > Andrew Haley wrote:
> > > > Roman Kennke writes:
> > > > > > While testing eclipse I sometimes saw interrupted reads occur.
> VMChannel
> > > > > > already had a mechanism for checking the interrupted status of a
> thread
> > > > > > when a system call returned early. But this wasn't used for the
> read()
> > > > > > and write() methods. This patch adds the logic. And makes my
> eclipse
> > > > > > happy again :)
> > > > >
> > > > > I am seeing a (possibly) related issue still:
> > > > >
> > > > > java.net.SocketException: Interrupted system call
> > > >
> > > > If connect(2) returns EINTR, you should retry:
> > > >
> > > > CPNIO_EXPORT int
> > > > cpnio_connect (int fd, const struct sockaddr *addr, socklen_t addrlen)
> > > > {
> > > > int retcode;
> > > > do
> > > > {
> > > > retcode = connect (fd, addr, addrlen);
> > > > }
> > > > while (retcode == EINTR);
> > > > return retcode;
> > > > }
> > >
> > > Except that you should probably also check if the thread was interrupted
> > > as the original patch does for read and write.
> >
> > I did it like that and it solved all my problems :-)
>
> But surely you have the same problem with any other callers of
> cpio_connect, or indeed cpio_*. You only fixed the bug in one place.
Yeah I agree. I was wondering the same, but I decided to follow what
Mark did and fix it in VMChannel. Maybe should pull all these fixes into
javanio.c then?
/Roman