This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: Socket regressions
- From: Tom Tromey <tromey at redhat dot com>
- To: Jeff Sturm <jsturm at one-point dot com>
- Cc: java-patches at gcc dot gnu dot org
- Date: 19 Mar 2002 15:14:38 -0700
- Subject: Re: Socket regressions
- References: <Pine.LNX.4.10.10203182330560.5794-100000@mars.deadcafe.org>
- Reply-to: tromey at redhat dot com
>>>>> "Jeff" == Jeff Sturm <jsturm@one-point.com> writes:
Jeff> 1) write() sometimes hangs in an infinite loop. It appears that
Jeff> we don't handle an error return from the system call properly.
Jeff> Moreover we ignore certain important errors like EBADF (why?).
I don't think there is a good reason to ignore EBADF.
In theory we should never see EBADF. That means that if we do, an
exception really is appropriate.
Jeff> 2) SIGPIPE randomly occurs while running in gdb, even though we
Jeff> ignore this signal.
I think that's a gdb/inferior interaction thing. Put this into
.gdbinit:
handle SIGPIPE nostop noprint
That works for me.
Jeff> 3) available() tends to return 1 for sockets even when there's
Jeff> nothing to be read. Is it important to also check FD_ISSET on
Jeff> the read descriptor? Or can we trust the return value of
Jeff> select()?
I thought we could trust select()s return value. Can it return 1
with !FD_ISSET(...)? In any case, I agree we ought to fix available
to be as reliable as we can make it.
Tom