[comp.unix.i386] Use of poll under SVR3.2.2

geoff@tolerant.com (Geoffrey Leach) (03/08/90)

I'm attempting to use poll with zero timeout on a pipe to achieve
a non-wait read.  The environment is ATT SVR3.2.2.

The environment I've set up consists of two child processes, each of
which sleeps, writes one line to stderr (unbuffered, with newline)
and terminates.  I also monitor exit status, so I know that the children
terminate the way I intend them to.

The first poll (before either child has written to the pipe) reports
an event on each of the two fds: POLLHUP.  This does not change.
If I let the reads proceed, they wait for the children to do their
writes as one would expect.  Setting O_NDELAY on the open is ineffective.

Any ideas would be appreciated.