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

Guarantee that all logging buffers are flushed before we die

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2104 fd59a12c-fef9-0310-b244-a6a79926bd2f
Fabio M. Di Nitto 17 лет назад
Родитель
Сommit
58ea3f928e
2 измененных файлов с 2 добавлено и 1 удалено
  1. 0 1
      exec/main.c
  2. 2 0
      exec/util.c

+ 0 - 1
exec/main.c

@@ -831,7 +831,6 @@ int main (int argc, char **argv)
 		 * 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);

+ 2 - 0
exec/util.c

@@ -90,6 +90,8 @@ void _corosync_exit_error (
 {
 	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);
 }