about summary refs log tree commit homepage
path: root/cmogstored.c
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2012-03-15 13:46:33 -0700
committerEric Wong <normalperson@yhbt.net>2012-03-15 20:46:49 +0000
commit993a6f929c352c4f640baf5eb734285b7a2a69d1 (patch)
tree1eb7bf28bd56291550e9f154ec1c8b7cc4d528b5 /cmogstored.c
parent8dfde57920bca7cdc70e9dccfb632028c2395979 (diff)
downloadcmogstored-993a6f929c352c4f640baf5eb734285b7a2a69d1.tar.gz
On GNU/Linux, this adds the setproctitle() function as implemented
by the libnostd project:

  http://www.25thandclement.com/~william/projects/libnostd.html
Diffstat (limited to 'cmogstored.c')
-rw-r--r--cmogstored.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/cmogstored.c b/cmogstored.c
index cd4a445..2346149 100644
--- a/cmogstored.c
+++ b/cmogstored.c
@@ -4,6 +4,7 @@
  */
 #include "cmogstored.h"
 #include "cfg.h"
+#include "nostd/setproctitle.h"
 #define THIS "cmogstored"
 #define DESC "alternative mogstored implementation for MogileFS"
 static char summary[] = THIS " -- "DESC;
@@ -348,6 +349,7 @@ static bool svc_queue_set(void *svcptr, void *queue)
 _Noreturn static void cmogstored_exit(void)
 {
         /* call atexit() handlers and make valgrind happy */
+        setproctitle("cmogstored, shutting down");
         mog_svc_each(svc_quit_each, NULL);
         mog_svc_dev_shutdown();
         mog_queue_stop(mog_notify_queue);