Skip to content

Commit

Permalink
exit can randomly call exit from main alongside clean_exit
Browse files Browse the repository at this point in the history
Signed-off-by: mohitkhullar <[email protected]>
  • Loading branch information
mohitkhullar authored and akshatsikarwar committed Jan 16, 2025
1 parent f4664b7 commit faa452e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion db/process_message.c
Original file line number Diff line number Diff line change
Expand Up @@ -616,6 +616,7 @@ static pthread_mutex_t exiting_lock = PTHREAD_MUTEX_INITIALIZER;
void *clean_exit_thd(void *unused)
{
comdb2_name_thread(__func__);
thrman_register(THRTYPE_CLEANEXIT);
if (!gbl_ready)
return NULL;

Expand All @@ -628,7 +629,6 @@ void *clean_exit_thd(void *unused)
Pthread_mutex_unlock(&exiting_lock);

bdb_thread_event(thedb->bdb_env, BDBTHR_EVENT_START_RDWR);
thrman_register(THRTYPE_CLEANEXIT);
thread_started("clean_exit");

clean_exit();
Expand Down

0 comments on commit faa452e

Please sign in to comment.