From 5d30e87c0affdafded44bb97f560a34b0208cadc Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Wed, 6 Mar 2019 13:49:50 -0600 Subject: [PATCH] ceph-mon: reset process name to 'ceph-mon' on startup After a respawn the process name ends up as 'exe' (because we do execve on /proc/$pid/exe). Reset to 'ceph-mon' so that killall works. Fixes: http://tracker.ceph.com/issues/38604 Signed-off-by: Sage Weil --- src/ceph_mon.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/ceph_mon.cc b/src/ceph_mon.cc index 0f9224e5b03..f51dce57e62 100644 --- a/src/ceph_mon.cc +++ b/src/ceph_mon.cc @@ -203,6 +203,10 @@ entity_addrvec_t make_mon_addrs(entity_addr_t a) int main(int argc, const char **argv) { + // reset our process name, in case we did a respawn, so that it's not + // left as "exe". + ceph_pthread_setname(pthread_self(), "ceph-mon"); + int err; bool mkfs = false; -- 2.39.5