Subject: Re: AF_LOCAL, SOCK_STREAM and poll(2)
To: None <firstname.lastname@example.org>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
Date: 09/17/2002 10:33:48
> For that particular project I could hack around it, but I am quite
> surprised that POLLHUP event was not generated, as the general BSD
> sockets API was generally followed by the UNIX domain.
POLLHUP was not part of the BSD sockets API; the Berkeley way was
sockets and select, the SV way was STREAMS and poll. Mixing sockets
and poll is miscegenation of a sort.
Of course, part of the problem is inherent to TCP, one of the few
design bugs in TCP. There is no way for a receiver to push "no more
receives" status back to the sender (at least not without accompanying
it with "no more sends"). I conjecture that this is least part of the
reason the API does not provide a non-abnormal way to indicate send
attempts on a connection that can't accept any further sends - there's
no send_without_sigpipe() call, if you will.
That's not to say it couldn't be done for AF_LOCAL sockets, of course,
nor even that it wouldn't be a good idea. Just perhaps that it's
understandable that it's not done.
/~\ The ASCII der Mouse
\ / Ribbon Campaign
X Against HTML email@example.com
/ \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B