On Fri, 20 May 2005, Ian FREISLICH wrote:
> You can do much the same with select(). Just replace my use of
> poll() with appropriate select() magic. The purpose of this code
> snippet was not to demonstrate the use of poll, but non-blocking
> IO. When you write to an fd, it may block and you have no idea how
> much you can write before it will block. If it's set to O_NONBLOCK,
> as soon as poll()/select() says you can write without blocking, you
> write() and write() returns at the point it would block with the
> number of bytes actually written.
OK. Point taken.
--
Philip Hazel University of Cambridge Computing Service,
ph10@??? Cambridge, England. Phone: +44 1223 334714.
Get the Exim 4 book: http://www.uit.co.uk/exim-book