From 3da38e35b432b5fa7610547f1a01f367bdae5dbf Mon Sep 17 00:00:00 2001 From: davidxu Date: Sun, 16 Mar 2008 03:22:38 +0000 Subject: Actually delete SIGCANCEL mask for suspended thread, so the signal will not be masked when it is resumed. --- lib/libthr/thread/thr_create.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'lib/libthr/thread') diff --git a/lib/libthr/thread/thr_create.c b/lib/libthr/thread/thr_create.c index 0dc1436..6eb3693 100644 --- a/lib/libthr/thread/thr_create.c +++ b/lib/libthr/thread/thr_create.c @@ -168,6 +168,7 @@ _pthread_create(pthread_t * thread, const pthread_attr_t * attr, SIGDELSET(set, SIGTRAP); __sys_sigprocmask(SIG_SETMASK, &set, &oset); new_thread->sigmask = oset; + SIGDELSET(new_thread->sigmask, SIGCANCEL); } ret = thr_new(¶m, sizeof(param)); @@ -181,10 +182,8 @@ _pthread_create(pthread_t * thread, const pthread_attr_t * attr, ret = EAGAIN; } - if (create_suspended) { + if (create_suspended) __sys_sigprocmask(SIG_SETMASK, &oset, NULL); - SIGDELSET(oset, SIGCANCEL); - } if (ret != 0) { if (!locked) -- cgit v1.1