linux-sysprog · beginner · ~15 min
Bound-check a signal number before using it.
Implement int valid_signal(int sig) returning 1 if sig is in the usable range 1..64, else 0.
int valid_signal(int sig) {
/* TODO */
return 0;
}
Solve this exercise in the browser editor — compile and run against the test harness, no setup required.