On Wednesday 09 July 2008 18:39, Niels Provos wrote: > On Wed, Jul 9, 2008 at 5:59 AM, Alexander Drozdov <[EMAIL PROTECTED]> wrote: > > I want to call event_base_free() in the child process to free parent's > > event_base before > > the next event_init() call. But this doesn't work correctly when using > > epoll because listening > > events of epolling descriptors are shared. > > Once you fork, the first libevent call you need to make it is > event_reinit(). Afterwards, it's save to call event_base_free().
Yes, this will work also, but this is similar to pressing "Start" button in windows when you want shut down. It does make sense to find more elegant solution if you have a lot of connections and don't want performance loss on every fork. -- Andrei Nigmatulin GPG PUB KEY 6449830D Now I lay me down to sleep(3) Pray the OS my core to keep If I die before I wake Pray the Disk my core to take _______________________________________________ Libevent-users mailing list Libevent-users@monkey.org http://monkeymail.org/mailman/listinfo/libevent-users