Skip to content
Snippets Groups Projects
Commit a7563b9c authored by rswindell's avatar rswindell
Browse files

Wait forever for event_thread to terminate. If the event thread continues to

execute after cleanup() is called, bad things happen (e.g. segfault).
parent eb8991ef
No related branches found
No related tags found
No related merge requests found
......@@ -4490,11 +4490,13 @@ void DLLCALL bbs_thread(void* arg)
lprintf(LOG_INFO,"Waiting for event thread to terminate...");
start=time(NULL);
while(events->event_thread_running) {
#if 0 /* the event thread can/will segfault if it continues to run and dereference sbbs->cfg */
if(time(NULL)-start>TIMEOUT_THREAD_WAIT) {
lprintf(LOG_ERR,"!TIMEOUT waiting for BBS event thread to "
"terminate");
break;
}
#endif
mswait(100);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment