summaryrefslogtreecommitdiff
path: root/sysdeps/mach
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/mach')
-rw-r--r--sysdeps/mach/pt-thread-terminate.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sysdeps/mach/pt-thread-terminate.c b/sysdeps/mach/pt-thread-terminate.c
index a89e505..b9d08fc 100644
--- a/sysdeps/mach/pt-thread-terminate.c
+++ b/sysdeps/mach/pt-thread-terminate.c
@@ -68,5 +68,11 @@ __pthread_thread_terminate (struct __pthread *thread)
err = __thread_terminate_release (kernel_thread, mach_task_self (),
kernel_thread, reply_port,
stackaddr, stacksize);
+
+ /* The kernel does not support it yet. Leak but at least terminate
+ correctly. */
+ err = __thread_terminate (kernel_thread);
+
+ /* We are out of luck. */
assert_perror (err);
}