• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // commit: a49c119276742d7d212fb88f83a8f559ca549e72 2011-02-19
2 // commit: 96f2197494791f5884c01b5caa908074cc7e90a6 2011-02-20
3 // commit: 23815f88df6c45247f3755dc7857f4013264c04f 2013-07-18
4 // implementation signals should not be masked
5 #include <signal.h>
6 #include <string.h>
7 #include <errno.h>
8 #include "test.h"
9 
main(void)10 int main(void)
11 {
12 	sigset_t s;
13 	int i;
14 
15 	sigemptyset(&s);
16 	for (i = 32; i < SIGRTMIN; i++) {
17 		sigaddset(&s, i);
18 		if (sigismember(&s, i) == 1)
19 			t_error("sigaddset(&s, %d) set implementation internal rt signal\n", i);
20 	}
21 	if (sigprocmask(SIG_BLOCK, &s, 0))
22 		t_error("blocking signals failed: %s\n", strerror(errno));
23 	if (sigprocmask(SIG_BLOCK, 0, &s))
24 		t_error("querying sigmask failed: %s\n", strerror(errno));
25 	for (i = 32; i < SIGRTMIN; i++)
26 		if (sigismember(&s, i) == 1)
27 			t_error("implementation internal rt signal %d can be blocked\n", i);
28 	return t_status;
29 }
30