فهرست منبع

Add log message to exit signal handler

I've seen a few instances where corosync has shut down for
apparently 'no reason'. In fact most of the time the shutdown
has been caused by an external source (often an init script)
but it's not been obvious what has happened and people
implicate the deamon

This patch simply adds a log message to the signal handler
when it is called so that the cause of the shutdown is obvious.

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
Christine Caulfield 12 سال پیش
والد
کامیت
3663622576
1فایلهای تغییر یافته به همراه1 افزوده شده و 0 حذف شده
  1. 1 0
      exec/main.c

+ 1 - 0
exec/main.c

@@ -232,6 +232,7 @@ static int32_t sig_diag_handler (int num, void *data)
 
 static int32_t sig_exit_handler (int num, void *data)
 {
+	log_printf(LOGSYS_LEVEL_NOTICE, "Node was shut down by a signal");
 	corosync_service_unlink_all (api, unlink_all_completed);
 	return 0;
 }