termux-packages/packages/redis/bio.c.patch

34 lines
1.2 KiB
Diff
Raw Normal View History

2020-05-13 11:33:34 +02:00
diff -uNr redis-6.0.1/src/bio.c redis-6.0.1.mod/src/bio.c
--- redis-6.0.1/src/bio.c 2020-05-02 01:10:20.000000000 +0300
+++ redis-6.0.1.mod/src/bio.c 2020-05-13 12:27:55.204680967 +0300
@@ -166,11 +166,6 @@
break;
}
2020-05-13 11:33:34 +02:00
- /* Make the thread killable at any time, so that bioKillThreads()
- * can work reliably. */
- pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);
- pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL);
2020-05-13 11:33:34 +02:00
-
pthread_mutex_lock(&bio_mutex[type]);
/* Block SIGALRM so we are sure that only the main thread will
2020-05-13 11:33:34 +02:00
* receive the watchdog signal. */
@@ -266,15 +261,7 @@
int err, j;
for (j = 0; j < BIO_NUM_OPS; j++) {
2020-05-13 11:33:34 +02:00
- if (bio_threads[j] && pthread_cancel(bio_threads[j]) == 0) {
- if ((err = pthread_join(bio_threads[j],NULL)) != 0) {
- serverLog(LL_WARNING,
- "Bio thread for job type #%d can be joined: %s",
- j, strerror(err));
- } else {
- serverLog(LL_WARNING,
- "Bio thread for job type #%d terminated",j);
- }
- }
+ pthread_kill(bio_threads[j], 0);
2020-05-13 11:33:34 +02:00
+ serverLog(LL_WARNING, "Bio thread for job type #%d terminated",j);
}
}