about summary refs log tree commit diff
path: root/src/thread
diff options
context:
space:
mode:
Diffstat (limited to 'src/thread')
-rw-r--r--src/thread/pthread_cancel.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/thread/pthread_cancel.c b/src/thread/pthread_cancel.c
index a21c3866..3d229223 100644
--- a/src/thread/pthread_cancel.c
+++ b/src/thread/pthread_cancel.c
@@ -92,5 +92,6 @@ int pthread_cancel(pthread_t t)
 		init = 1;
 	}
 	a_store(&t->cancel, 1);
+	if (t == pthread_self() && !t->cancelasync) return 0;
 	return pthread_kill(t, SIGCANCEL);
 }