termux-packages/packages/nzbget/thread.cpp.patch

23 lines
830 B
Diff

diff --git a/daemon/util/Thread.cpp b/daemon/util/Thread.cpp
index 199005f..61b5bcb 100644
--- a/daemon/util/Thread.cpp
+++ b/daemon/util/Thread.cpp
@@ -111,7 +111,7 @@ void Thread::Start()
pthread_attr_t m_attr;
pthread_attr_init(&m_attr);
pthread_attr_setdetachstate(&m_attr, PTHREAD_CREATE_DETACHED);
- pthread_attr_setinheritsched(&m_attr, PTHREAD_INHERIT_SCHED);
+ //pthread_attr_setinheritsched(&m_attr, PTHREAD_INHERIT_SCHED);
m_running = !pthread_create(&m_threadObj, &m_attr, Thread::thread_handler, (void *) this);
pthread_attr_destroy(&m_attr);
#endif
@@ -140,7 +140,7 @@ bool Thread::Kill()
#ifdef WIN32
bool terminated = TerminateThread(m_threadObj, 0) != 0;
#else
- bool terminated = pthread_cancel(m_threadObj) == 0;
+ bool terminated = pthread_kill(m_threadObj, 0) == 0;
#endif
if (terminated)