]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mon: fix preforker exit behavior behavior
authorSage Weil <sage@inktank.com>
Sat, 1 Jun 2013 04:23:45 +0000 (21:23 -0700)
committerSage Weil <sage@inktank.com>
Thu, 6 Jun 2013 00:44:20 +0000 (17:44 -0700)
commit92d085f7fd6224ffe5b7651c1f83b093f964b5cd
treed62d375340a2dcffa209bde19554b6738455470d
parent91d54a8f36a77647ac2c52a36f38a87197c316b5
mon: fix preforker exit behavior behavior

In 3c5706163b72245768958155d767abf561e6d96d we made exit() not actually
exit so that the leak checking would behave for a non-forking case.
That is only needed for the normal exit case; every other case expects
exit() to actually terminate and not continue execution.

Instead, make a signal_exit() method that signals the parent (if any)
and then lets you return.  exit() goes back to it's usual behavior,
fixing the many other calls in main().

Backport: cuttlefish
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
src/ceph_mon.cc
src/common/Preforker.h