From 1cc78b6a864d36cbe1eda45890d7f361adb8201d Mon Sep 17 00:00:00 2001 From: Josh Durgin Date: Fri, 27 May 2011 17:40:28 -0700 Subject: [PATCH] osd: add command to exit cleanly This is required for gcov to work on daemons since the coverage data is written atexit, and the function that writes the data is not exported. Signed-off-by: Josh Durgin --- src/osd/OSD.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index caac74750ba54..1b19d6600eb3b 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -2388,6 +2388,11 @@ void OSD::handle_command(MMonCommand *m) dout(0) << "reset pg recovery stats" << dendl; pg_recovery_stats.reset(); } + else if (m->cmd[0] == "exit") { + dout(0) << "exiting cleanly" << dendl; + exit(0); + } + else dout(0) << "unrecognized command! " << m->cmd << dendl; done: -- 2.39.5