linux-sysprog · intermediate · ~15 min
Detect the SA_SIGINFO flag.
Implement int gets_siginfo(int flags) returning 1 if SA_SIGINFO is set (so the three-argument handler is used), else 0.
#include <signal.h>
int gets_siginfo(int flags) {
/* TODO */
return 0;
}
Solve this exercise in the browser editor — compile and run against the test harness, no setup required.