From ecf2c0d11f03d77fe1f3489dc1c058bd5902f554 Mon Sep 17 00:00:00 2001 From: wangjiaming0909 <604227650@qq.com> Date: Mon, 26 Aug 2024 13:46:40 +0800 Subject: [PATCH] fix pthread_create caused pthread_join crash --- source/os/src/osThread.c | 1 + 1 file changed, 1 insertion(+) diff --git a/source/os/src/osThread.c b/source/os/src/osThread.c index 5a24e7775f..95ff06e09e 100644 --- a/source/os/src/osThread.c +++ b/source/os/src/osThread.c @@ -20,6 +20,7 @@ int32_t taosThreadCreate(TdThread *tid, const TdThreadAttr *attr, void *(*start)(void *), void *arg) { int32_t code = pthread_create(tid, attr, start, arg); if (code) { + taosThreadClear(tid); terrno = TAOS_SYSTEM_ERROR(code); return terrno; }