>> And thread_terminate does exist, that's why it's enough for our needs. > > You mean ‘thread_terminate_release’?
Okay, let me explain it a bit better Here is the part we are interested in "libpthread/sysdeps/mach/pt-thread-terminate.c" /* Terminate and release all that's left. */ 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); The comment "The kernel does not support it yet." is misleading. It wants to say that __thread_terminate_release is not yet supported so __thread_terminate can be used instead, to at least terminate it correctly, even though we will have leaks. That's why Samuel told me here http://lists.gnu.org/archive/html/bug-hurd/2014-05/msg00127.html > Manolis Ragkousis, le Thu 15 May 2014 21:08:41 +0000, a écrit : > > So I commented the part that calls this function out and glibc gets > > built succefully with libpthread. > > > err = __thread_terminate_release (kernel_thread, mach_task_self (), > > That should be fine, yes, IIRC I left a thread_terminate call just > below, which should work enough for your needs. Manolis