未验证 提交 80b6f9b0 编写于 作者: D Dave-in-lafayette 提交者: GitHub

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.
上级 c49fb47f
......@@ -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",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册