|
@@ -205,6 +205,8 @@ static int logsys_dropped_messages = 0;
|
|
|
|
|
|
|
|
void *logsys_rec_end;
|
|
void *logsys_rec_end;
|
|
|
|
|
|
|
|
|
|
+static pid_t startup_pid = 0;
|
|
|
|
|
+
|
|
|
static DECLARE_LIST_INIT(logsys_print_finished_records);
|
|
static DECLARE_LIST_INIT(logsys_print_finished_records);
|
|
|
|
|
|
|
|
#define FDMAX_ARGS 64
|
|
#define FDMAX_ARGS 64
|
|
@@ -1242,16 +1244,20 @@ void _logsys_log_vprintf (
|
|
|
short_file_name++; /* move past the "/" */
|
|
short_file_name++; /* move past the "/" */
|
|
|
#endif /* BUILDING_IN_PLACE */
|
|
#endif /* BUILDING_IN_PLACE */
|
|
|
|
|
|
|
|
- /*
|
|
|
|
|
- * Create a log record
|
|
|
|
|
- */
|
|
|
|
|
- _logsys_log_rec (
|
|
|
|
|
- rec_ident,
|
|
|
|
|
- function_name,
|
|
|
|
|
- short_file_name,
|
|
|
|
|
- file_line,
|
|
|
|
|
- logsys_print_buffer, len + 1,
|
|
|
|
|
- LOGSYS_REC_END);
|
|
|
|
|
|
|
+ if (startup_pid == 0 || startup_pid == getpid()) {
|
|
|
|
|
+ /*
|
|
|
|
|
+ * Create a log record if we are really true corosync
|
|
|
|
|
+ * process (not fork of some service) or if we didn't finished
|
|
|
|
|
+ * initialization yet.
|
|
|
|
|
+ */
|
|
|
|
|
+ _logsys_log_rec (
|
|
|
|
|
+ rec_ident,
|
|
|
|
|
+ function_name,
|
|
|
|
|
+ short_file_name,
|
|
|
|
|
+ file_line,
|
|
|
|
|
+ logsys_print_buffer, len + 1,
|
|
|
|
|
+ LOGSYS_REC_END);
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
/*
|
|
/*
|
|
|
* If logsys is not going to print a message to a log target don't
|
|
* If logsys is not going to print a message to a log target don't
|
|
@@ -1324,6 +1330,8 @@ int _logsys_config_subsys_get (const char *subsys)
|
|
|
void logsys_fork_completed (void)
|
|
void logsys_fork_completed (void)
|
|
|
{
|
|
{
|
|
|
logsys_loggers[LOGSYS_MAX_SUBSYS_COUNT].mode &= ~LOGSYS_MODE_FORK;
|
|
logsys_loggers[LOGSYS_MAX_SUBSYS_COUNT].mode &= ~LOGSYS_MODE_FORK;
|
|
|
|
|
+ startup_pid = getpid();
|
|
|
|
|
+
|
|
|
(void)_logsys_wthread_create ();
|
|
(void)_logsys_wthread_create ();
|
|
|
}
|
|
}
|
|
|
|
|
|