linux-sysprog · beginner · ~15 min

Is it a stop signal?

Identify the job-control stop signals.

Challenge

Implement int is_stop_signal(int sig) returning 1 for SIGSTOP and SIGTSTP (which pause a process), else 0.

Starter code

#include <signal.h>

int is_stop_signal(int sig) {
    /* TODO */
    return 0;
}

Solve this exercise in the browser editor — compile and run against the test harness, no setup required.