summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSage Weil <sage@inktank.com>2013-04-07 09:04:37 -0700
committerSage Weil <sage@inktank.com>2013-04-07 09:07:21 -0700
commit1e7ddd9e9fb4ce97a1b17bb5fa52611132353490 (patch)
treefe50eeaf0839906d87b51ec66111689fa3e7f396
parentf5ba0fbbe73e11418634bc95e1fc36d17edccf37 (diff)
downloadceph-1e7ddd9e9fb4ce97a1b17bb5fa52611132353490.tar.gz
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 <sage@inktank.com>
-rw-r--r--src/global/global_init.cc1
1 files changed, 1 insertions, 0 deletions
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);