[PATCH] Add log message to SIGINT handler

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 SIGINT handler when it is called so that the cause of the shutdown is obvious.

Signed-off-by: Christine Caulfield <ccaulfie@xxxxxxxxxx>
diff --git a/exec/main.c b/exec/main.c
index 6c69ee5..ed43ac2 100644
--- a/exec/main.c
+++ b/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 SIGINT");
 	corosync_service_unlink_all (api, unlink_all_completed);
 	return 0;
 }
_______________________________________________
discuss mailing list
discuss@xxxxxxxxxxxx
http://lists.corosync.org/mailman/listinfo/discuss

[Index of Archives]     [Linux Clusters]     [Corosync Project]     [Linux USB Devel]     [Linux Audio Users]     [Photo]     [Yosemite News]    [Yosemite Photos]    [Linux Kernel]     [Linux SCSI]     [X.Org]

  Powered by Linux