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