From 82fa43b768e09bf30669351b61eb2f94cb1c71a3 Mon Sep 17 00:00:00 2001 From: rpj Date: Fri, 24 Jul 1998 07:52:30 +0000 Subject: Fri Jul 24 16:33:17 1998 Ross Johnson * sync.c (pthread_detach): Use equality test, not assignment. * create.c (_pthread_start_call): Add call to Win32 CloseHandle() if thread is detached. --- create.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'create.c') diff --git a/create.c b/create.c index e15a98f..45b1570 100644 --- a/create.c +++ b/create.c @@ -24,6 +24,11 @@ _pthread_start_call(void * thisarg) unsigned ret; int from; + if (this->detached == PTHREAD_CREATE_DETACHED) + { + (void) CloseHandle(this->thread); + } + func = this->call.routine; arg = this->call.arg; -- cgit v1.2.3