[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [Libevent-users] exceptfds



On Wed, Apr 11, 2012 at 12:18:51PM +0200, Florian Lohoff wrote:
> 
> Hi,
> 
> is there a reason libevent has no way to feed in exceptfds?
> 
> I have a little project for a couple of years with DVB Streaming and certain
> ioctls for linux DVB drivers require the fds to be polled for exceptions. Up to
> now all drivers were happy to also trigger read events but now there are some
> beeing correct on the specs to i need to poll on exceptions on an fd.
> 
> libevent does not seem to support this but is there a way around?
> 
> Currently the plan is to split this into a seperate thread with its
> own select loop.

You could create your own epoll descriptor, register the driver fd with
that, and wait on the epoll descriptor using libevent with EV_READ.

Basically, the epoll descriptor would act as a proxy. Clean and simple,
presuming you'd have to write some Linux specific, #ifdef'd code either way.
***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users    in the body.