Re: [exim] data-phase efficiency

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Philip Hazel
Date:  
À: Ian FREISLICH
CC: exim-users, Jeremy Harris
Sujet: Re: [exim] data-phase efficiency
On Wed, 18 May 2005, Ian FREISLICH wrote:

> You need to do the following (non blocking descriptors rule):
>
>    fcntl(s, F_SETFL, O_NONBLOCK);

>
>    pollfd.fd = s
>    pollfd.events = POLLWRNORM | POLLERR | POLLHUP | POLLNVAL;


All the man pages I read for poll() say that POLLERR, POLLHUP, and
POLLNVAL are bits that get set in revents, and are not bits that you set
in events.

The man page on my Linux box says that POLLWRNORM is only available
"when compiling XPG4.2 source". The man page on Solaris says that
POLLWRNORM is the same as POLLOUT, so I guess that will do.

However, we know that there are systems that don't implement poll(), or
implement it badly. (Are there any that don't support O_NONBLOCK?) I'm
not keen on rocking this particular boat.


-- 
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