From a07c840a6a94082fdfb24114e78c256b0eacd901 Mon Sep 17 00:00:00 2001 From: Matt Wells Date: Thu, 17 Dec 2015 10:15:39 -0800 Subject: [PATCH] join with threads when exiting -- to no avail exit status is still foobar. --- Spider.cpp | 2 +- Threads.cpp | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Spider.cpp b/Spider.cpp index c54d2f79d..9b1d2c9b2 100644 --- a/Spider.cpp +++ b/Spider.cpp @@ -7576,7 +7576,7 @@ bool SpiderLoop::gotDoledbList2 ( ) { // note it if ( (g_corruptCount % 1000) == 0 ) log("spider: got corrupt doledb record. ignoring. " - "pls fix!!!"); + "pls fix!!! cn=%i",(int)m_collnum); g_corruptCount++; // skip for now....!! what is causing this??? m_list.skipCurrentRecord(); diff --git a/Threads.cpp b/Threads.cpp index d3a10c684..3fcb3f09e 100644 --- a/Threads.cpp +++ b/Threads.cpp @@ -3353,6 +3353,8 @@ void ThreadQueue::killAllThreads ( ) { if ( ! e->m_isLaunched ) continue; log("threads: killling thread id %i",(int)e->m_joinTid); pthread_kill ( e->m_joinTid , SIGKILL ); + log("threads: joining with thread id %i",(int)e->m_joinTid); + pthread_join ( e->m_joinTid , NULL ); } }