R8B-0 devpoll patch

Artur Grabowski <>
Tue Mar 5 10:57:35 CET 2002


Sorry for the long delay. I had to catch a few deadlines.

Per Bergqvist <> writes:

> > Yes, you can select(2)/poll(2) on kqueue descriptors. You can also  
> > register kqueue descriptors on another kqueue just to add to the    
> > orthogonality.                                                      
> >                                                                     
>                                                                       
> Great.                                                                
> A few other questions:                                                
>                                                                       
> 1) What is the best way to check if the fd should use poll or kqueue ?
> (in the Linux I do a fstat and test the mode)

Try to register a kevent and see if it fails? I haven't really thought about
it.

> 2) Do you have to register EVFILT_READ and WRITE as separate event    
> filters or can you simply OR them in one event ?

separate events. Anything else wouldn't allow the kqueue to live up to what
it promises (all events will be delivered if registering succeeds, resources
allocated on registration and not delivery).

//art



More information about the erlang-questions mailing list