1 /* Test program that invokes the Linux system call rt_sigqueueinfo(). */
11 int main(int argc
, char **argv
)
14 const size_t sz
= sizeof(*si
);
17 fprintf(stderr
, "sizeof(*si) = %zu\n", sz
);
18 fprintf(stdout
, "offsetof(siginfo_t, si_signo) = %zd\n",
19 offsetof(siginfo_t
, si_signo
));
20 fprintf(stdout
, "offsetof(siginfo_t, si_errno) = %zd\n",
21 offsetof(siginfo_t
, si_errno
));
22 fprintf(stdout
, "offsetof(siginfo_t, si_code) = %zd\n",
23 offsetof(siginfo_t
, si_code
));
26 si
->si_signo
= SIGWINCH
;
27 si
->si_code
= SI_QUEUE
;
28 si
->si_pid
= getpid();
29 si
->si_uid
= getuid();
30 syscall(__NR_rt_sigqueueinfo
, getpid(), SIGWINCH
, si
);
32 fprintf(stderr
, "Done.\n");