A problem that I am running into on HP-UX 11i v2 (11.23) is that the
select() system call on this OS does not seem to provide a way to tell
when all readers of a pipe have closed, aside from attempting a
non-zero write to the pipe (which then fails as expected). On Linux
and Solaris, for example, the write-end will show as both readable and
writable when all readers have closed.

Does anyone know a way to determine whether all readers of a pipe have
closed, w/o writing anything to the pipe and w/o blocking?