]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr: set explicit thread name 17756/head
authorJohn Spray <john.spray@redhat.com>
Fri, 15 Sep 2017 16:23:39 +0000 (12:23 -0400)
committerJohn Spray <john.spray@redhat.com>
Fri, 15 Sep 2017 16:26:34 +0000 (17:26 +0100)
This gets used as our process name in some situations
when respawning.  This is the same as what commit 4f177bb6b
did for the MDS.

Fixes: http://tracker.ceph.com/issues/21404
Signed-off-by: John Spray <john.spray@redhat.com>
src/ceph_mgr.cc

index 91043f6e81628a1f6e9bf65a5727871a6fbbed03..5e8f6798e3924271ba21ed375b25931ed0cba81e 100644 (file)
 
 #include <Python.h>
 
+#include <pthread.h>
+
 #include "include/types.h"
+#include "include/compat.h"
 #include "common/config.h"
 #include "common/ceph_argparse.h"
 #include "common/errno.h"
@@ -38,6 +41,8 @@ static void usage()
  */
 int main(int argc, const char **argv)
 {
+  ceph_pthread_setname(pthread_self(), "ceph-mgr");
+
   vector<const char*> args;
   argv_to_vec(argc, argv, args);
   env_to_vec(args);