From: David Zafman Date: Tue, 9 May 2017 23:52:15 +0000 (-0700) Subject: mon: Bring daemonization in line with other daemons X-Git-Tag: ses5-milestone8~1^2~19^2~18 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=19da3e8441a5055a2946c88eabb7ddf14c92c144;p=ceph.git mon: Bring daemonization in line with other daemons ceph-mon doesn't use the global_init_daemonize() as the other daemons do. This resulted in the daemon staying in the session of the process that started it. In testing if I terminated a test script only ceph-mon would be exit. Signed-off-by: David Zafman --- diff --git a/src/ceph_mon.cc b/src/ceph_mon.cc index 0b5d4edfd793..de1c10e4c9b1 100644 --- a/src/ceph_mon.cc +++ b/src/ceph_mon.cc @@ -500,6 +500,7 @@ int main(int argc, const char **argv) derr << err_msg << dendl; prefork.exit(err); } + setsid(); global_init_postfork_start(g_ceph_context); } common_init_finish(g_ceph_context);