kqueue alternative?

Eric Jacobs eaja at erols.com
Mon Jun 16 11:42:10 PDT 2003


On Mon, 16 Jun 2003 10:11:10 -0700
Joshua Oreman <oremanj at www.get-linux.org> wrote:

> On Mon, Jun 16, 2003 at 11:44:15AM +0100 or thereabouts, Tony Finch seemed to write:
> > 
> > Select doesn't work with files.
> 
> Really? `man 2 select' says nothing about that. It just talks about
> 'file descriptors'. Now if it said 'socket descriptors' or 'non-file
> file descriptors' I would understand, but I don't think that that statement
> is implied by the man page. Is there something I'm missing?

A file descriptor that references an ordinary vnode (file or directory)
will always be "ready for I/O", because unlike a socket or pipe, it never
needs to block in order to tell you if it's at EOF.

So, while it works, and is logical, it isn't terribly useful.


More information about the freebsd-hackers mailing list