From aa488a963eaef5cfff2b1b1290e1e17e0ce34b9c Mon Sep 17 00:00:00 2001 From: rswindell <> Date: Wed, 13 Mar 2002 17:25:22 +0000 Subject: [PATCH] Fixed output_sem re-initialization bug that caused segfaults in Linux and *may* have been a cause of occasional output blocks in Win32. --- src/sbbs3/main.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/sbbs3/main.cpp b/src/sbbs3/main.cpp index 69714e9132..293bdc8486 100644 --- a/src/sbbs3/main.cpp +++ b/src/sbbs3/main.cpp @@ -873,7 +873,11 @@ void output_thread(void* arg) avail=buftop-bufbot; if(!avail) { +/** + This caused occasional segfaults on Linux and *could* have been the cause + of blocked output on Win32 (what was I thinking?) sem_init(&sbbs->output_sem,0,0); +**/ sem_wait(&sbbs->output_sem); continue; } @@ -1737,7 +1741,7 @@ bool sbbs_t::init() #ifdef _WIN32 output_sem=CreateEvent( NULL // pointer to security attributes - ,true // flag for manual-reset event + ,false // flag for manual-reset event ,false // flag for initial state ,NULL // pointer to event-object name ); -- GitLab