Tevent hacking

Volker Lendecke Volker.Lendecke at SerNet.DE
Sat Jul 25 04:50:27 MDT 2009

On Sat, Jul 25, 2009 at 02:42:19AM +0000, Timur I. Bakeyev wrote:
> Couple of questions I have so far. First - why our own library, when
> there are plenty of others, that implement generic event loop :)?

Well, NIH? :-)

Seriously, none of the others integrate so nicely with
talloc. Just doing a talloc_free on an event just very, very
handy if you want for example error handling to get right.

It would be possible though to plug in other event loops as
tevent backends. I think Jelmer has done it for the gnome
event loop somewhere.

> >From looking into epoll() handling I got an impression, that we only
> monitor file handlers, but from other side, I see something related to
> signals and timers as well. So what's that exactly and what is an idea
> behind? And why they implemented the way they implemented :)?

Signals are notoriously hard to get right. The tevent_signal
thing abstracts away most of that ugliness. And, if you for
example look at libev, that does not support the sigaction
style signals we need for kernel oplock support.

And timers -- that's just an obvious thing to do IMO.

> Both for epoll() and kqueue() it's possible to monitor delivery of the
> signals to the process, and at least for kqueue it's possible to deliver

epoll() does signals? I did not know that, but that is
really great!

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20090725/84a90508/attachment.pgp>

More information about the samba-technical mailing list