Re: and nicer too - Re: [PATCH] epoll more scalable than poll

bert hubert
2002-10-29T00:47:13Z

On Mon, Oct 28, 2002 at 04:57:12PM -0800, Davide Libenzi wrote:

> > If that code dares to read immediatly from the fd without having an explicit
> > POLLIN event, which also means that epoll can only be used in this fashion
> > with nonblocking sockets.
>
> The epoll interface has to be used with non-blocking fds. The EAGAIN

Ok, so that is two things that need to be in the manpage and probably in
bold:

1) epoll only works on pipes and sockets
(not on tty, not on files)

2) epoll must be used on non-blocking sockets only
(and describe the race that happens otherwise)

If you send me the source of your manpages I'll work it in if you want.

I still vote for checking at insert time however unless that is too
expensive. Yes, we want people to read the manpages and heed them, but we
also not want to create interfaces that are needlessly errorprone.

Regards,

bert

--
http://www.PowerDNS.com Versatile DNS Software & Services
http://lartc.org Linux Advanced Routing & Traffic Control HOWTO