Socket regressions
Tom Tromey
tromey@redhat.com
Tue Mar 19 18:57:00 GMT 2002
>>>>> "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
More information about the Java-patches
mailing list