diff options
author | Bo Yang <boyang@novell.com> | 2009-01-05 19:47:45 +0800 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2009-01-05 15:07:31 +0100 |
commit | 022e2f81991f12637ca0eeb3a030d4cec69d6fb9 (patch) | |
tree | 47f153de1292b5b75d602f0a21428eb75510cac5 /source3/lib | |
parent | 73875cd344608b591fa884ab99b5f3a10550c149 (diff) | |
download | samba-022e2f81991f12637ca0eeb3a030d4cec69d6fb9.tar.gz samba-022e2f81991f12637ca0eeb3a030d4cec69d6fb9.tar.bz2 samba-022e2f81991f12637ca0eeb3a030d4cec69d6fb9.zip |
clean event context after child is forked.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'source3/lib')
-rw-r--r-- | source3/lib/events.c | 6 | ||||
-rw-r--r-- | source3/lib/util.c | 3 |
2 files changed, 9 insertions, 0 deletions
diff --git a/source3/lib/events.c b/source3/lib/events.c index 8bbc9497ac..7d4cdc209b 100644 --- a/source3/lib/events.c +++ b/source3/lib/events.c @@ -369,6 +369,12 @@ static int event_context_destructor(struct event_context *ev) return 0; } +void event_context_reinit(struct event_context *ev) +{ + event_context_destructor(ev); + return; +} + struct event_context *event_context_init(TALLOC_CTX *mem_ctx) { struct event_context *result; diff --git a/source3/lib/util.c b/source3/lib/util.c index d00a764c1d..08ea5add7a 100644 --- a/source3/lib/util.c +++ b/source3/lib/util.c @@ -949,6 +949,7 @@ void become_daemon(bool Fork, bool no_process_group) } bool reinit_after_fork(struct messaging_context *msg_ctx, + struct event_context *ev_ctx, bool parent_longlived) { NTSTATUS status; @@ -976,6 +977,8 @@ bool reinit_after_fork(struct messaging_context *msg_ctx, return false; } + event_context_reinit(ev_ctx); + return true; } |