2020-09-11 20:07:33 +02:00
|
|
|
diff -uNr redis-6.0.1/src/bio.c redis-6.0.1.mo/src/bio.c
|
2020-05-13 11:33:34 +02:00
|
|
|
--- redis-6.0.1/src/bio.c 2020-05-02 01:10:20.000000000 +0300
|
2020-09-11 20:07:33 +02:00
|
|
|
+++ redis-6.0.1.mo/src/bio.c 2020-05-13 12:27:55.204680967 +0300
|
2020-05-13 11:33:34 +02:00
|
|
|
@@ -166,11 +166,6 @@
|
|
|
|
break;
|
|
|
|
}
|
2017-03-07 14:31:25 +01:00
|
|
|
|
2020-05-13 11:33:34 +02:00
|
|
|
- /* Make the thread killable at any time, so that bioKillThreads()
|
|
|
|
- * can work reliably. */
|
2017-03-07 14:31:25 +01:00
|
|
|
- pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);
|
|
|
|
- pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL);
|
2020-05-13 11:33:34 +02:00
|
|
|
-
|
2017-03-07 14:31:25 +01: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 @@
|
2017-03-07 14:31:25 +01:00
|
|
|
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) {
|
2017-03-07 14:31:25 +01:00
|
|
|
- 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);
|
2017-03-07 14:31:25 +01:00
|
|
|
}
|
|
|
|
}
|