fix pthread_create caused pthread_join crash

This commit is contained in:
wangjiaming0909 2024-08-26 13:46:40 +08:00
parent e035eb1224
commit ecf2c0d11f
1 changed files with 1 additions and 0 deletions

View File

@ -20,6 +20,7 @@
int32_t taosThreadCreate(TdThread *tid, const TdThreadAttr *attr, void *(*start)(void *), void *arg) { int32_t taosThreadCreate(TdThread *tid, const TdThreadAttr *attr, void *(*start)(void *), void *arg) {
int32_t code = pthread_create(tid, attr, start, arg); int32_t code = pthread_create(tid, attr, start, arg);
if (code) { if (code) {
taosThreadClear(tid);
terrno = TAOS_SYSTEM_ERROR(code); terrno = TAOS_SYSTEM_ERROR(code);
return terrno; return terrno;
} }