make pthread_exit responsible for disabling cancellation
this requirement is tucked away in XSH 2.9.5 Thread Cancellation under
the heading Thread Cancellation Cleanup Handlers.
diff --git a/src/thread/pthread_create.c b/src/thread/pthread_create.c
index 64971d5..b6a7a5e 100644
--- a/src/thread/pthread_create.c
+++ b/src/thread/pthread_create.c
@@ -23,6 +23,8 @@
pthread_t self = __pthread_self();
sigset_t set;
+ self->canceldisable = 1;
+ self->cancelasync = 0;
self->result = result;
while (self->cancelbuf) {