ev_default_destroy's behaviour

Marc Lehmann schmorp at schmorp.de
Tue Jul 27 16:57:40 CEST 2010

On Thu, Jul 22, 2010 at 07:29:13PM +0200, Robin Haberkorn <rh at travelping.com> wrote:
> Hi!

Hi, could you format your e-mail in a readable way next time (following
one of the many netiquette versions around), or tell your mailer to set
the proper content-type? Your mail contains enourmously long lines which
makes it evry hard to read and hard to reply (... people might not bother
to reply in the future).

> In other words, I would expect a small program like this one to return immediately:

This program of course doesn't compile due to multiple reasons, but I would
expect "something like it" to also just return. I'll investigate, thanks for
your report!

> I was tempted to use it once in a program where the default loop
> definitely makes sense (synchronizing signals without asyncs etc), at
> some point forks and has to clean up the default loop in the new process
> to allow some scripts to work with it (no execve either). I ended up
> stopping all watchers & resetting the still-messed-up signal handlers
> manually after invoking ev_default_fork().

Yes, I'd say that's entirely reasonable. Makes a good case for
unregistering signal handlers too, actually (but is hard to do since libev
doesn't know about them).

                The choice of a       Deliantra, the free code+content MORPG
      -----==-     _GNU_              http://www.deliantra.net
      ----==-- _       generation
      ---==---(_)__  __ ____  __      Marc Lehmann
      --==---/ / _ \/ // /\ \/ /      schmorp at schmorp.de
      -=====/_/_//_/\_,_/ /_/\_\

More information about the libev mailing list