Blame src/regression/sigprocmask-internal.c
|
Szabolcs Nagy |
cfa23c |
// commit: a49c119276742d7d212fb88f83a8f559ca549e72 2011-02-19
|
|
Szabolcs Nagy |
cfa23c |
// commit: 96f2197494791f5884c01b5caa908074cc7e90a6 2011-02-20
|
|
Szabolcs Nagy |
cfa23c |
// commit: 23815f88df6c45247f3755dc7857f4013264c04f 2013-07-18
|
|
Szabolcs Nagy |
cfa23c |
// implementation signals should not be masked
|
|
Szabolcs Nagy |
cfa23c |
#include <signal.h>
|
|
Szabolcs Nagy |
cfa23c |
#include <string.h>
|
|
Szabolcs Nagy |
cfa23c |
#include <errno.h>
|
|
Szabolcs Nagy |
cfa23c |
#include "test.h"
|
|
Szabolcs Nagy |
cfa23c |
|
|
Szabolcs Nagy |
cfa23c |
int main(void)
|
|
Szabolcs Nagy |
cfa23c |
{
|
|
Szabolcs Nagy |
cfa23c |
sigset_t s;
|
|
Szabolcs Nagy |
cfa23c |
int i;
|
|
Szabolcs Nagy |
cfa23c |
|
|
Szabolcs Nagy |
cfa23c |
sigemptyset(&s);
|
|
Szabolcs Nagy |
cfa23c |
for (i = 32; i < SIGRTMIN; i++) {
|
|
Szabolcs Nagy |
cfa23c |
sigaddset(&s, i);
|
|
Szabolcs Nagy |
cfa23c |
if (sigismember(&s, i) == 1)
|
|
Szabolcs Nagy |
cfa23c |
t_error("sigaddset(&s, %d) set implementation internal rt signal\n", i);
|
|
Szabolcs Nagy |
cfa23c |
}
|
|
Szabolcs Nagy |
cfa23c |
if (sigprocmask(SIG_BLOCK, &s, 0))
|
|
Szabolcs Nagy |
cfa23c |
t_error("blocking signals failed: %s\n", strerror(errno));
|
|
Szabolcs Nagy |
cfa23c |
if (sigprocmask(SIG_BLOCK, 0, &s))
|
|
Szabolcs Nagy |
cfa23c |
t_error("querying sigmask failed: %s\n", strerror(errno));
|
|
Szabolcs Nagy |
cfa23c |
for (i = 32; i < SIGRTMIN; i++)
|
|
Szabolcs Nagy |
cfa23c |
if (sigismember(&s, i) == 1)
|
|
Szabolcs Nagy |
cfa23c |
t_error("implementation internal rt signal %d can be blocked\n", i);
|
|
Szabolcs Nagy |
cfa23c |
return t_status;
|
|
Szabolcs Nagy |
cfa23c |
}
|