]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
global: flush log before stopping/starting on daemonize
authorSage Weil <sage@inktank.com>
Sun, 7 Apr 2013 16:04:37 +0000 (09:04 -0700)
committerSage Weil <sage@inktank.com>
Sun, 7 Apr 2013 16:07:21 +0000 (09:07 -0700)
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>
src/global/global_init.cc

index 43ce09095651aa80e2f203a0e20ec23c70eb1c99..0f7179c39dfda360340697e3570b73ccfe5f3fa5 100644 (file)
@@ -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);