Hi Steven,

this patch makes sure that logs are flushed when we are about to die.

In most cases logsys is not fully initialized yet and all the error logs
are just queued in the buffers. We want to guarantee that the user can
see them.

Fabio
--- exec/util.c	(revision 2100)
+++ exec/util.c	(working copy)
@@ -90,6 +90,8 @@
 {
 	log_printf (LOGSYS_LEVEL_ERROR, "AIS Executive exiting "
 		"with status %d at %s:%u.\n", err, file, line);
+	logsys_fork_completed ();
+	logsys_flush ();
 	exit (err);
 }
 
--- exec/main.c	(revision 2100)
+++ exec/main.c	(working copy)
@@ -831,7 +831,6 @@
 		 * nor that logsys is sending the messages where we expect.
 		 */
 		log_printf (LOGSYS_LEVEL_ERROR, "%s", error_string);
-		logsys_fork_completed ();
 		fprintf(stderr, "%s", error_string);
 		syslog (LOGSYS_LEVEL_ERROR, "%s", error_string);
 		corosync_exit_error (AIS_DONE_MAINCONFIGREAD);
_______________________________________________
Openais mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/openais

Reply via email to