[PATCH] clean the event context after fork in
fork_domain_child()
Jeremy Allison
jra at samba.org
Tue Jan 6 19:37:11 GMT 2009
On Tue, Jan 06, 2009 at 05:47:04PM +0100, Stefan (metze) Metzmacher wrote:
> Jeremy Allison schrieb:
> > On Tue, Jan 06, 2009 at 09:28:32AM +0100, Stefan (metze) Metzmacher wrote:
> >> Jeremy Allison schrieb:
> >>> On Tue, Jan 06, 2009 at 01:19:41PM +0800, boyang wrote:
> >>>
> >>>> v2-event-context-master.diff frees check_online_event. But I think you
> >>>> don't need it now. Because all events freeing work will be done in
> >>>> winbindd_reinit_after_fork() :-). As you said.
> >>> Yep, as soon as I've written it :-).
> >> Hi Jeremy,
> >>
> >> could make winbindd_reinit_after_fork() call reinit_after_fork(),
> >> it would be nice to keep the common code in one spot.
> >
> > Yes, that's the plan. All the xxxx_reinit_after_fork()
> > calls should do their own specific cleanups, then call
> > reinit_after_fork().
>
> The best would be if we would create completely new
> event_context and messaging_context instead of reinit the current
> ones. that would remove the samba3 specifix event_context_reinit(),
> but we need to register all messaging callbacks again (but that
> would make the code much more understandable for me).
>
> I would have done this, but I wasn't sure what this would break.
It's pretty much the same IMHO. We either remove all event
callbacks, or create a new context and re-add all events.
The real issue is the pointers to the events being stored
elsewhere. I was thinking about stashing a pointer to the
event pointer in the event struct, and nulling it out on
event free, but that way probably lies madness (and nasty
crashes :-).
Jeremy.
More information about the samba-technical
mailing list