Merge pull request #27458 from taosdata/fix/3.0/TD-31601
fix pthread_create caused pthread_join crash
This commit is contained in:
commit
ed0997ebb6
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue