summaryrefslogtreecommitdiff
path: root/create.c
diff options
context:
space:
mode:
Diffstat (limited to 'create.c')
-rw-r--r--create.c5
1 files changed, 5 insertions, 0 deletions
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;