Well, I forgot #3:
3> The OS has a buggy poll() or select().
This is unlikely when we are talking about Solaris, if nothing else since it's manpage uses blocking I/O with select.
Also:
POLLIN Data other than high priority data may be read without blocking. For STREAMS, this flag is set in revents even if the message is of zero length.
POLLRDNORM Normal data (priority band equals 0) may be read without blocking. For STREAMS, this flag is set in revents even if the message is of zero length.
POLLRDBAND Data from a non-zero priority band may be read without blocking. For STREAMS, this flag is set in revents even if the message is of zero length.
POLLPRI High priority data may be received without blocking. For STREAMS, this flag is set in revents even if the message is of zero length.
POLLOUT Normal data (priority band equals 0) may be written without blocking.
POLLWRNORM The same as POLLOUT.
POLLWRBAND Priority data (priority band > 0) may be written. This event only examines bands that have been written to at least once.
POLLERR An error has occurred on the device or stream. This flag is only valid in the revents bitmask; it is not used in the events member.
POLLHUP A hangup has occurred on the stream. This event and POLLOUT are mutually exclusive; a stream can never be writable if a hangup has occurred. However, this event and POLLIN, POLLRDNORM, POLLRDBAND, or POLLPRI are
It is not possible to use the POLLOUT feature, though, since pike does not have a read( len, 1 ) equivalent for write.
Note that nonblocking mode is actually rather unessesary if you have poll.
/ Per Hedbor ()
Previous text:
2003-03-19 14:38: Subject: I/O callbacks in blocking mode
Well, I forgot #3:
3> The OS has a buggy poll() or select().
This is unlikely when we are talking about Solaris, if nothing else since it's manpage uses blocking I/O with select.
Also:
POLLIN Data other than high priority data may be read without blocking. For STREAMS, this flag is set in revents even if the message is of zero length. POLLRDNORM Normal data (priority band equals 0) may be read without blocking. For STREAMS, this flag is set in revents even if the message is of zero length. POLLRDBAND Data from a non-zero priority band may be read without blocking. For STREAMS, this flag is set in revents even if the message is of zero length. POLLPRI High priority data may be received without blocking. For STREAMS, this flag is set in revents even if the message is of zero length. POLLOUT Normal data (priority band equals 0) may be written without blocking. POLLWRNORM The same as POLLOUT. POLLWRBAND Priority data (priority band > 0) may be written. This event only examines bands that have been written to at least once. POLLERR An error has occurred on the device or stream. This flag is only valid in the revents bitmask; it is not used in the events member. POLLHUP A hangup has occurred on the stream. This event and POLLOUT are mutually exclusive; a stream can never be writable if a hangup has occurred. However, this event and POLLIN, POLLRDNORM, POLLRDBAND, or POLLPRI are
It is not possible to use the POLLOUT feature, though, since pike does not have a read( len, 1 ) equivalent for write.
/ Per Hedbor ()
pike-devel@lists.lysator.liu.se