linux-sysprog · intermediate · ~15 min
Recall which signals kill by default.
Implement int default_terminates(int sig) returning 1 if the signal's default action terminates the process for SIGINT, SIGTERM, SIGKILL, SIGQUIT, SIGSEGV, else 0.
#include <signal.h>
int default_terminates(int sig) {
/* TODO */
return 0;
}
Solve this exercise in the browser editor — compile and run against the test harness, no setup required.