fix pthread_create caused pthread_join crash
This commit is contained in:
parent
e035eb1224
commit
ecf2c0d11f
|
@ -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