ceph_mon: output preforker error message

Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
This commit is contained in:
Haomai Wang 2015-05-01 13:12:49 +08:00
parent 9e1514cff2
commit de5717eb9a

View File

@ -497,9 +497,17 @@ int main(int argc, const char **argv)
Preforker prefork;
if (!(flags & CINIT_FLAG_NO_DAEMON_ACTIONS)) {
if (global_init_prefork(g_ceph_context, 0) >= 0) {
prefork.prefork();
string err_msg;
err = prefork.prefork(err_msg);
if (err < 0) {
cerr << err_msg << std::endl;
prefork.exit(err);
}
if (prefork.is_parent()) {
return prefork.parent_wait();
err = prefork.parent_wait(err_msg);
if (err < 0)
cerr << err_msg << std::endl;
prefork.exit(err);
}
global_init_postfork_start(g_ceph_context);
}