[PATCH] clean the event context after fork in fork_domain_child()

Stefan (metze) Metzmacher metze at samba.org
Mon Jan 5 14:07:03 GMT 2009

boyang schrieb:
> Stefan (metze) Metzmacher wrote:
>> Hi BoYang,
>>>      The point here is that there maybe outstanding requests in parent,
>>> and async_request_timeout is set, which cause this child try to kill
>>> some other child, probably be primary domain's child. Look, After
>>> winbindd started, child for primary domain is forked, then other domains
>>> such as BUILTIN. If there are outstanding requests sent to child for
>>> primary domain, async_request_timeout handler is set, which is
>>> inheritted in child for domain BUILTIN. Later, time expired and child
>>> for BUILTIN sends SIGTERM to child for primary domain.
>>>      Patches are in the attachment, Thanks!
>> I think the real solution is to create a new event context in the child
>> process (and free the parents context). In the end we should do that
>> also within smbd...
>> metze
> Hi, Metze:
>      I've finished the patch to clean event context after fork. Please
> review it. In event_context_reinit(ev), I freed all timed_event and
> fd_event to save some memory. Initial test and 'make test' looks fine.
>      Thanks!

Please use 'git format-patch --stdout origin/master..HEAD > foo.diff' in
future, so that 'git am' is easily possible. Thanks!


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
Url : http://lists.samba.org/archive/samba-technical/attachments/20090105/3856f136/signature.bin

More information about the samba-technical mailing list