1
0
mirror of https://github.com/termux/termux-packages synced 2024-06-14 05:46:38 +00:00
termux-packages/packages/redis/pthread_cancel.patch
2021-05-01 16:43:38 +02:00

12 lines
560 B
Diff

--- ./src/debug.c.orig 2021-05-01 14:39:04.609215050 +0000
+++ ./src/debug.c 2021-05-01 14:39:20.555895312 +0000
@@ -1706,7 +1706,7 @@
static void killMainThread(void) {
int err;
- if (pthread_self() != server.main_thread_id && pthread_cancel(server.main_thread_id) == 0) {
+ if (pthread_self() != server.main_thread_id && pthread_kill(server.main_thread_id, 0) == 0) {
if ((err = pthread_join(server.main_thread_id,NULL)) != 0) {
serverLog(LL_WARNING, "main thread can not be joined: %s", strerror(err));
} else {