diff options
author | Volker Lendecke <vl@samba.org> | 2008-04-23 17:13:50 +0200 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2008-04-23 22:18:26 +0200 |
commit | 0c4093a234dfaca6d363a6e1358f2fbf421dcd3c (patch) | |
tree | bb66bc62760c3a17a2b39aecf284855bde5f8288 /source3/lib | |
parent | 5c3b9a38f51ce69a3e15d8799809a117acb85a72 (diff) | |
download | samba-0c4093a234dfaca6d363a6e1358f2fbf421dcd3c.tar.gz samba-0c4093a234dfaca6d363a6e1358f2fbf421dcd3c.tar.bz2 samba-0c4093a234dfaca6d363a6e1358f2fbf421dcd3c.zip |
Fix CLEAR_IF_FIRST handling of messages.tdb
We now open messages.tdb even before we do the become_daemon. become_daemon()
involves a fork and an immediate exit of the parent, thus the
parent_is_longlived argument must be set to false in this case. The parent is
not really long lived :-)
(This used to be commit 4f4781c6d17fe2db34dd5945fec52a7685448aec)
Diffstat (limited to 'source3/lib')
-rw-r--r-- | source3/lib/util.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source3/lib/util.c b/source3/lib/util.c index db0da541f9..953981e82a 100644 --- a/source3/lib/util.c +++ b/source3/lib/util.c @@ -990,7 +990,8 @@ void become_daemon(bool Fork, bool no_process_group) attach it to the logfile */ } -bool reinit_after_fork(struct messaging_context *msg_ctx) +bool reinit_after_fork(struct messaging_context *msg_ctx, + bool parent_longlived) { NTSTATUS status; @@ -1001,7 +1002,7 @@ bool reinit_after_fork(struct messaging_context *msg_ctx) set_need_random_reseed(); /* tdb needs special fork handling */ - if (tdb_reopen_all(1) == -1) { + if (tdb_reopen_all(parent_longlived ? 1 : 0) == -1) { DEBUG(0,("tdb_reopen_all failed.\n")); return false; } |