linux-sysprog · beginner · ~15 min
Group the process-ending signals.
Implement int is_termination_signal(int sig) returning 1 for SIGINT, SIGTERM, SIGKILL, SIGQUIT (signals that ask a process to end), else 0.
#include <signal.h>
int is_termination_signal(int sig) {
/* TODO */
return 0;
}
Solve this exercise in the browser editor — compile and run against the test harness, no setup required.