Просмотр исходного кода

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 лет назад
Родитель
Сommit
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;
 }