os-unix: Actually call pthread_join() to avoid an infinite loop and 100% cpu usage. It happens randomly. Fixes #738. Thanks to kkrev or frankfranks.

db4
Doug Coleman 2012-10-26 10:36:01 -07:00
parent 8eb4d2723f
commit 1cdd080445
1 changed files with 3 additions and 1 deletions

View File

@ -505,8 +505,10 @@ A Nvidia driver bug on Linux is the reason this has to be done, see:
http://www.nvnews.net/vbulletin/showthread.php?t=164619 */
void factor_vm::close_console()
{
if (stdin_thread_initialized_p)
if (stdin_thread_initialized_p) {
pthread_cancel(stdin_thread);
pthread_join(stdin_thread, 0);
}
}
void factor_vm::lock_console()