termux-packages/packages/qalc/util.cc.patch

24 lines
719 B
Diff
Raw Normal View History

2017-08-30 23:25:59 +02:00
--- ../libqalculate-2.0.0/libqalculate/util.cc 2017-08-27 20:37:20.000000000 +0200
+++ ./libqalculate/util.cc 2017-08-30 21:33:31.235484528 +0200
@@ -771,8 +771,8 @@
2017-08-10 00:23:25 +02:00
}
void Thread::enableAsynchronousCancel() {
- pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);
- pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL);
+ //pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);
+ //pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL);
}
void *Thread::doRun(void *data) {
2017-08-30 23:25:59 +02:00
@@ -795,7 +795,8 @@
2017-08-10 00:23:25 +02:00
bool Thread::cancel() {
2017-08-30 23:25:59 +02:00
if(!running) return true;
- running = pthread_cancel(m_thread) != 0;
+ //running = pthread_cancel(m_thread) != 0;
+ running = pthread_kill(m_thread, 0) != 0;
2017-08-10 00:23:25 +02:00
return !running;
}
2017-08-30 23:25:59 +02:00