From: Sage Weil Date: Sun, 7 Apr 2013 16:04:37 +0000 (-0700) Subject: global: flush log before stopping/starting on daemonize X-Git-Tag: v0.61~220^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=1e7ddd9e9fb4ce97a1b17bb5fa52611132353490;p=ceph.git global: flush log before stopping/starting on daemonize Ensure that we push log data out before we restart logging. This may not be strictly necessary, but it avoids a whole class of possible pitfalls. Signed-off-by: Sage Weil --- diff --git a/src/global/global_init.cc b/src/global/global_init.cc index 43ce0909565..0f7179c39df 100644 --- a/src/global/global_init.cc +++ b/src/global/global_init.cc @@ -148,6 +148,7 @@ void global_init_daemonize(CephContext *cct, int flags) return; // stop log thread + g_ceph_context->_log->flush(); g_ceph_context->_log->stop(); int ret = daemon(1, 1);