tm-thread: detect thread death

When a thread is dead at init the THV_INIT_DONE flag is not set
and the spawn function can freeze (see bug #553 for an example).
In this case THV_RUNNING_DONE is set and we can also check on this
state for leaving the function. This should fix #bug553
pull/98/head
Eric Leblond 13 years ago
parent af7f4b347d
commit ffbbff9d6c

@ -1771,7 +1771,7 @@ TmEcode TmThreadSpawn(ThreadVars *tv)
return TM_ECODE_FAILED;
}
TmThreadWaitForFlag(tv, THV_INIT_DONE);
TmThreadWaitForFlag(tv, THV_INIT_DONE | THV_RUNNING_DONE);
TmThreadAppend(tv, tv->type);

Loading…
Cancel
Save