From a1945135ac5682e47056b32cb584c45e923ba571 Mon Sep 17 00:00:00 2001 From: Loic Dachary Date: Sun, 29 Dec 2013 12:22:16 +0100 Subject: [PATCH] mon: do not daemonize if CINIT_FLAG_NO_DAEMON_ACTIONS Signed-off-by: Loic Dachary --- src/ceph_mon.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ceph_mon.cc b/src/ceph_mon.cc index 49e4fb936cfc2..78a2fa611e4c7 100644 --- a/src/ceph_mon.cc +++ b/src/ceph_mon.cc @@ -325,6 +325,7 @@ int main(int argc, const char **argv) // we fork early to prevent leveldb's environment static state from // screwing us over Preforker prefork; + if (!(flags & CINIT_FLAG_NO_DAEMON_ACTIONS)) { if (g_conf->daemonize) { global_init_prefork(g_ceph_context, 0); prefork.prefork(); @@ -335,6 +336,7 @@ int main(int argc, const char **argv) } common_init_finish(g_ceph_context); global_init_chdir(g_ceph_context); + } MonitorDBStore *store = new MonitorDBStore(g_conf->mon_data); -- 2.39.5