Use sigprocmask(SIG_SETMASK) to make sure the signal mask is in a
known state before performing the test. This is done because perl on
some systems leaves some signals blocked when starting child
processes which can cause this test to fail.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3021 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/memcheck/tests/sigprocmask.c b/memcheck/tests/sigprocmask.c
index dc00102..2817901 100644
--- a/memcheck/tests/sigprocmask.c
+++ b/memcheck/tests/sigprocmask.c
@@ -21,6 +21,12 @@
    s  = &x[1];
    os = &x[4];
 
+   // Make sure the system is in a known state with no signals
+   // blocked as perl has been known to leave some signals blocked
+   // when starting child processes which can cause failures in
+   // this test unless we reset things here.
+   syscall(__NR_sigprocmask, SIG_SETMASK, os, NULL);
+
    fprintf(stderr, "before\n");
    for (i = 0; i < 6; i++) {
       fprintf(stderr, "%x ", x[i]);