From: Ronnie Sahlberg Date: Mon, 20 Aug 2007 23:43:53 +0000 (+1000) Subject: add an atexit() that will print "CTDB daemon shutting down" in the log X-Git-Tag: tevent-0.9.20~348^2~2437^2~7 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5228abef6483ec490361cdb6603533926b029c5d;p=thirdparty%2Fsamba.git add an atexit() that will print "CTDB daemon shutting down" in the log when the main daemon exits (This used to be ctdb commit f7422397be2e319bfbee5bf0670583c353eda86d) --- diff --git a/ctdb/server/ctdb_daemon.c b/ctdb/server/ctdb_daemon.c index 78c67b3ccc7..f216ca4365d 100644 --- a/ctdb/server/ctdb_daemon.c +++ b/ctdb/server/ctdb_daemon.c @@ -616,6 +616,10 @@ static int unlink_destructor(const char *name) return 0; } +static void print_exit_message(void) +{ + DEBUG(0,("CTDB daemon shutting down\n")); +} /* start the protocol going as a daemon @@ -640,6 +644,9 @@ int ctdb_start_daemon(struct ctdb_context *ctdb, bool do_fork) return 0; } + /* Make sure we log something when the daemon terminates */ + atexit(print_exit_message); + tdb_reopen_all(False); if (do_fork) {