ctdbd: Message logged at exit should be different for different processes
authorMartin Schwenke <martin@meltin.net>
Thu, 10 Jan 2013 03:39:09 +0000 (14:39 +1100)
committerAmitay Isaacs <amitay@gmail.com>
Tue, 5 Feb 2013 05:03:41 +0000 (16:03 +1100)
Some subprocesses print "CTDB daemon shutting down" when they exit and
this can be confusing.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Pair-programmed-with: Amitay Isaacs <amitay@gmail.com>

server/ctdb_daemon.c

index fdfd5dee771474537f1c7cea4c8228000d678e9a..0550fabf93d26b639a15f3c9085dd35f22601781 100644 (file)
@@ -40,7 +40,11 @@ static void daemon_incoming_packet(void *, struct ctdb_req_header *);
 
 static void print_exit_message(void)
 {
-       DEBUG(DEBUG_NOTICE,("CTDB daemon shutting down\n"));
+       if (debug_extra != NULL && debug_extra[0] != '\0') {
+               DEBUG(DEBUG_NOTICE,("CTDB %s shutting down\n", debug_extra));
+       } else {
+               DEBUG(DEBUG_NOTICE,("CTDB daemon shutting down\n"));
+       }
 }