mirror of
https://gitlab.xiph.org/xiph/icecast-server.git
synced 2024-12-04 14:46:30 -05:00
Don't use start after freeing it in thread startup code.
svn path=/trunk/thread/; revision=3264
This commit is contained in:
parent
338f6a0a31
commit
0dbd488c17
@ -574,6 +574,7 @@ static void *_start_routine(void *arg)
|
||||
void *(*start_routine)(void *) = start->start_routine;
|
||||
void *real_arg = start->arg;
|
||||
thread_t *thread = start->thread;
|
||||
int detach = start->detached;
|
||||
|
||||
_block_signals();
|
||||
|
||||
@ -587,7 +588,7 @@ static void *_start_routine(void *arg)
|
||||
|
||||
LOG_INFO4("Added thread %d [%s] started at [%s:%d]", thread->thread_id, thread->name, thread->file, thread->line);
|
||||
|
||||
if (start->detached) {
|
||||
if (detach) {
|
||||
pthread_detach(thread->sys_thread);
|
||||
}
|
||||
pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);
|
||||
|
Loading…
Reference in New Issue
Block a user