]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
ceph_mon: split postfork() in two and finish postfork just before daemonize
authorJoao Eduardo Luis <joao.luis@inktank.com>
Fri, 14 Mar 2014 17:39:00 +0000 (17:39 +0000)
committerJoao Eduardo Luis <joao.luis@inktank.com>
Fri, 14 Mar 2014 17:39:00 +0000 (17:39 +0000)
commitc95234ac6b5516601297167679cb0da4ffd6ffa8
tree76e1c7b3309ad533206811871849d0c0182cabf6
parent1249b0bd76bde12796652aa5dc52ecba51fd52ce
ceph_mon: split postfork() in two and finish postfork just before daemonize

We split global_init_postfork() in two: start and finish, with the first
keeping much of postfork()'s tasks except closing stderr, which we leave
open until just before we daemonize.  This allows the user to see any
error messages that the monitor may spit out before it daemonizes, making
sense of the error code (which we were already returning).

Fixes: 7489
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
src/ceph_mon.cc
src/global/global_init.cc
src/global/global_init.h