]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: do not daemonize if CINIT_FLAG_NO_DAEMON_ACTIONS
authorLoic Dachary <loic@dachary.org>
Sun, 29 Dec 2013 11:22:16 +0000 (12:22 +0100)
committerLoic Dachary <loic@dachary.org>
Tue, 31 Dec 2013 12:46:38 +0000 (13:46 +0100)
Signed-off-by: Loic Dachary <loic@dachary.org>
src/ceph_mon.cc

index 49e4fb936cfc28103e0169e7764d5d6dc77c07fc..78a2fa611e4c7581731e9947ae3bf9599c20fe28 100644 (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);