5 # include <sys/syscall.h>
9 // Reg test for bug #93328: we were using too-big sigset types, and thus
10 // trashing memory when we wrote out the 'oldset' param from sigprocmask().
14 #if defined(__NR_sigprocmask) \
15 && !defined(__powerpc64__) \
19 // arm-linux uses rt_sigprocmask, so no sigset mangling takes place
33 // Make sure the system is in a known state with no signals
34 // blocked as perl has been known to leave some signals blocked
35 // when starting child processes which can cause failures in
36 // this test unless we reset things here.
37 syscall(__NR_sigprocmask, SIG_SETMASK, os, NULL);
39 fprintf(stderr, "before\n");
40 for (i = 0; i < 6; i++) {
41 fprintf(stderr, "%x ", x[i]);
43 fprintf(stderr, "\n");
45 syscall(__NR_sigprocmask, SIG_BLOCK, s, os);
47 fprintf(stderr, "after1\n");
48 for (i = 0; i < 6; i++) {
49 fprintf(stderr, "%x ", x[i]);
51 fprintf(stderr, "\n");
53 syscall(__NR_sigprocmask, SIG_BLOCK, s, os);
55 fprintf(stderr, "after2\n");
56 for (i = 0; i < 6; i++) {
57 fprintf(stderr, "%x ", x[i]);
59 fprintf(stderr, "\n");
63 fprintf(stderr, "__NR_sigprocmask not supported on this platform\n");