summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSage Weil <sage@inktank.com>2013-05-04 01:20:26 +0200
committerSage Weil <sage@inktank.com>2013-05-04 01:20:26 +0200
commit1a67f7b3ac3c035d6e4b2181fbad903aa4b03711 (patch)
tree2b91e1ed4a53ab2c4a2085ef3dc4f1941e4e28f0
parentmon: avoid null deref in Monitor::_mon_status() (diff)
downloadceph-1a67f7b3ac3c035d6e4b2181fbad903aa4b03711.tar.xz
ceph-1a67f7b3ac3c035d6e4b2181fbad903aa4b03711.zip
mon: fix init sequence when not daemonizing
We made the common_init_finish and chdir conditional on daemonize in commit 2e0dd5ae6c8751e33d456b2b06c1204b63db959a, breaking init (asok at least) when -f is specified (as with upstart). Signed-off-by: Sage Weil <sage@inktank.com> Reviewed-by: Greg Farnum <greg@inktank.com>
-rw-r--r--src/ceph_mon.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ceph_mon.cc b/src/ceph_mon.cc
index 0189a319b5d..28e897e961a 100644
--- a/src/ceph_mon.cc
+++ b/src/ceph_mon.cc
@@ -283,9 +283,9 @@ int main(int argc, const char **argv)
return prefork.parent_wait();
}
global_init_postfork(g_ceph_context, 0);
- common_init_finish(g_ceph_context);
- global_init_chdir(g_ceph_context);
}
+ common_init_finish(g_ceph_context);
+ global_init_chdir(g_ceph_context);
{
Monitor::StoreConverter converter(g_conf->mon_data);