Check-in [f278a98272]
Overview
Comment:Ensure that pthread condition variable in logging is initialized
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: f278a982721a446ebf1daa257c88a996679fa531
User & Date: rkeene on 2020-04-01 19:03:57
Other Links: manifest | tags
Context
2020-04-02
15:49
More inputs to AFL check-in: abedee59bf user: rkeene tags: trunk
2020-04-01
19:03
Ensure that pthread condition variable in logging is initialized check-in: f278a98272 user: rkeene tags: trunk
18:37
Emit links to downloads check-in: cb5ff1a1e0 user: rkeene tags: trunk
Changes

Modified filed.c from [28001c198c] to [e0a9bfdbe7].

198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
/* Global variables */
/** Open File cache **/
struct filed_fileinfo *filed_fileinfo_fdcache = NULL;
unsigned int filed_fileinfo_fdcache_size = 0;

/** Logging **/
struct filed_log_entry *filed_log_msg_list;
pthread_mutex_t filed_log_msg_list_mutex;
pthread_cond_t filed_log_msg_list_ready;

/* Signal Handler */
static void filed_signal_handler(int signal_number) {
	struct filed_fileinfo *cache;
	unsigned int idx;

	switch (signal_number) {







|
|







198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
/* Global variables */
/** Open File cache **/
struct filed_fileinfo *filed_fileinfo_fdcache = NULL;
unsigned int filed_fileinfo_fdcache_size = 0;

/** Logging **/
struct filed_log_entry *filed_log_msg_list;
pthread_mutex_t filed_log_msg_list_mutex = PTHREAD_MUTEX_INITIALIZER;
pthread_cond_t filed_log_msg_list_ready = PTHREAD_COND_INITIALIZER;

/* Signal Handler */
static void filed_signal_handler(int signal_number) {
	struct filed_fileinfo *cache;
	unsigned int idx;

	switch (signal_number) {
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
	pthread_t thread_id;

	args = malloc(sizeof(*args));
	args->fp = logfp;

	filed_log_msg_list = NULL;

	pthread_mutex_init(&filed_log_msg_list_mutex, NULL);

	pthread_create(&thread_id, NULL, filed_logging_thread, args);

	filed_log_msg("START");

	return(0);
}
#endif







<
<







595
596
597
598
599
600
601


602
603
604
605
606
607
608
	pthread_t thread_id;

	args = malloc(sizeof(*args));
	args->fp = logfp;

	filed_log_msg_list = NULL;



	pthread_create(&thread_id, NULL, filed_logging_thread, args);

	filed_log_msg("START");

	return(0);
}
#endif