diff --git a/src/sbbs3/main.cpp b/src/sbbs3/main.cpp index c727d0af9250a0bf3e6329af59c05a21439e60d3..0f1e28a0dde48e12efced7c1c57cb7ff9836c3af 100644 --- a/src/sbbs3/main.cpp +++ b/src/sbbs3/main.cpp @@ -1206,8 +1206,10 @@ void input_thread(void *arg) if((i=select(high_socket+1,&socket_set,NULL,NULL,&tv))<1) { if(pthread_mutex_unlock(&sbbs->input_thread_mutex)!=0) sbbs->errormsg(WHERE,ERR_UNLOCK,"input_thread_mutex",0); - if(i==0) - continue; + if(i==0) { + YIELD(); /* This kludge is necessary on some Linux distros */ + continue; /* to allow other threads to lock the input_thread_mutex */ + } if(sbbs->client_socket==INVALID_SOCKET) break;