mon: do not daemonize if CINIT_FLAG_NO_DAEMON_ACTIONS

Signed-off-by: Loic Dachary <loic@dachary.org>
This commit is contained in:
Loic Dachary 2013-12-29 12:22:16 +01:00
parent 10aa220a55
commit a1945135ac

View File

@ -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);