]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: add command to exit cleanly
authorJosh Durgin <josh.durgin@dreamhost.com>
Sat, 28 May 2011 00:40:28 +0000 (17:40 -0700)
committerJosh Durgin <josh.durgin@dreamhost.com>
Tue, 7 Jun 2011 19:04:29 +0000 (12:04 -0700)
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 <josh.durgin@dreamhost.com>
src/osd/OSD.cc

index caac74750ba549e9ba22191239af4a5e7b3dfd00..1b19d6600eb3bcd3de9ec5077780d87fe5d823e4 100644 (file)
@@ -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: