From d0870a69bfaea4e1c57b2fced2477b0546bb7006 Mon Sep 17 00:00:00 2001 From: bje Date: Fri, 24 Jul 1998 05:20:10 +0000 Subject: 1998-07-24 Ben Elliston * sync.c (pthread_detach): Close the Win32 thread handle to emulate detached (or daemon) threads. --- ChangeLog | 5 +++++ sync.c | 8 ++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 29b2289..4ad0356 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +1998-07-24 Ben Elliston + + * sync.c (pthread_detach): Close the Win32 thread handle to + emulate detached (or daemon) threads. + Fri Jul 24 03:00:25 1998 Ross Johnson * sync.c (pthread_join): Save valueptr arg in joinvalueptr for diff --git a/sync.c b/sync.c index e8262a6..2fc08ec 100644 --- a/sync.c +++ b/sync.c @@ -84,7 +84,11 @@ pthread_detach(pthread_t thread) { return EINVAL; } - - /* FIXME: As far as I can determine we just no-op. */ + + this->attr.detached = PTHREAD_CREATE_DETACHED; + if (CloseHandle(thread) != TRUE) + { + return ESRCH; + } return 0; } -- cgit v1.2.3