diff options
author | Dave-in-lafayette <64047859+Dave-in-lafayette@users.noreply.github.com> | 2020-04-20 16:38:06 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-20 16:38:06 -0700 |
commit | 80b6f9b0cb46666a14d471248cc3747930a28dd4 (patch) | |
tree | b56d612414269beba8ca4b16b5d3526aab3afee5 /src/bio.c | |
parent | c49fb47fbe0086dc9e44b8ac39128beb7ec1bf3a (diff) | |
download | redis-80b6f9b0cb46666a14d471248cc3747930a28dd4.tar.gz |
fix for crash during panic before all threads are up
If there's a panic before all threads have been started (say, if file descriptor 0 is closed at exec), the panic response will crash here again.
Diffstat (limited to 'src/bio.c')
-rw-r--r-- | src/bio.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -266,7 +266,7 @@ void bioKillThreads(void) { int err, j; for (j = 0; j < BIO_NUM_OPS; j++) { - if (pthread_cancel(bio_threads[j]) == 0) { + 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", |