mikep@sco.COM (Mike Patnode) (08/21/90)
It looks to me like BytesReadable() in Xlibos.h (AKA: FIONREAD) is
expected to return -1 if the connection is closed. In Lachman TCP/IP
this isn't so, and I can't find anything that says it should. I also
took a quick look at the BSD 4.3 kernel, and I couldn't find it being
done there.
Now this may not be a problem at all. Xlib may check the return
value of BytesReadable() just for a sanity check, but it looks to me
like _XEventsQueued() is expecting this to be an indicator of the
connection status.
So this leads to a few questions:
What are the functional specs for BytesReadable()?
If a connection is broken, when and how should a client find out?
Does anybody's FIONREAD return -1 on a closed connection?
And the bonus question:
Does anybody know what I_NREAD is supposed to do when there is a
M_HANGUP on the stream? (Take a wild guess at the answer I want)
--
Mike Patnode The Santa Cruz Operation
SCO Software Engineer 400 Encinal Street
{ucscc,uunet}!sco!mikep mikep@sco.COM P.O. Box 1900
(408) 458-1422 Santa Cruz, CA 95061