From: Julian Seward Date: Wed, 18 Sep 2002 13:52:36 +0000 (+0000) Subject: pthread_kill would incorrectly deliver a signal to a thread even if X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=027e50a85e9e47f914a136d63596d87ab9f2bede;p=thirdparty%2Fvalgrind.git pthread_kill would incorrectly deliver a signal to a thread even if the thread currently had the signal blocked. Fixed. It _may_ also fix some assertion failures in scheduler_sanity() in vg_scheduler.c. MERGE TO ERASER git-svn-id: svn://svn.valgrind.org/valgrind/branches/VALGRIND_1_0_BRANCH@1072 --- diff --git a/vg_signals.c b/vg_signals.c index 24448d4427..27a4871e4f 100644 --- a/vg_signals.c +++ b/vg_signals.c @@ -1194,7 +1194,11 @@ Bool VG_(deliver_signals) ( void ) vg_dcss.dcss_sigpending[sigNo] = False; vg_dcss.dcss_destthread[sigNo] = VG_INVALID_THREADID; continue; /* for (sigNo = 1; ...) loop */ - } + } else if (VG_(ksigismember)(&(tst->sig_mask), sigNo)) { + /* signal blocked in specific thread, so we can't + deliver it just now */ + continue; /* for (sigNo = 1; ...) loop */ + } } else { /* not directed to a specific thread, so search for a suitable candidate */