diff --git a/src/thread_pthread.cpp b/src/thread_pthread.cpp index 7aa0fda18e..4645e4027f 100644 --- a/src/thread_pthread.cpp +++ b/src/thread_pthread.cpp @@ -63,7 +63,9 @@ public: /* virtual */ bool IsRunning() { - return m_thr != 0; + int sval; + sem_getvalue(&m_sem_stop, &sval); + return sval == 0; } /* virtual */ bool WaitForStop()