28#if __has_include(<unistd.h>)
32void FC_FUNC_(block_signals, BLOCK_SIGNALS)() {
36 act.sa_handler = SIG_IGN;
37 sigemptyset(&act.sa_mask);
45void FC_FUNC_(unblock_signals, UNBLOCK_SIGNALS)() {
49 act.sa_handler = SIG_DFL;
50 sigemptyset(&act.sa_mask);
71void FC_FUNC_(trap_segfault, TRAP_SEGFAULT)() {
75 sigemptyset(&act.sa_mask);
77 act.sa_flags = SA_SIGINFO;
94void FC_FUNC_(get_signal_description,
95 GET_SIGNAL_DESCRIPTION)(
fint *signum,
96 STR_F_TYPE
const signame STR_ARG1) {
98 TO_F_STR1(strsignal(*signum), signame);
100 TO_F_STR1(
"(description not available)", signame);
void segv_handler(int signum, siginfo_t *si, void *vd)
__sighandler_t signal(int __sig, __sighandler_t __handler) __attribute__((__nothrow__
int kill(__pid_t __pid, int __sig) __attribute__((__nothrow__
int sigaction(int __sig, const struct sigaction *__restrict __act, struct sigaction *__restrict __oact) __attribute__((__nothrow__