linux-sysprog · beginner · ~15 min
Know the two uncatchable signals.
Implement int is_catchable(int sig) returning 0 for SIGKILL and SIGSTOP (which can never be caught or ignored) and 1 for any other signal.
#include <signal.h>
int is_catchable(int sig) {
/* TODO */
return 1;
}
Solve this exercise in the browser editor — compile and run against the test harness, no setup required.