linux-sysprog · intermediate · ~15 min
Observe repeated synchronous delivery.
Install a SIGUSR1 handler that increments a counter, raise it twice, and implement int raise_twice(void) returning the counter (2).
#include <signal.h>
int raise_twice(void) {
/* TODO */
return 0;
}
Solve this exercise in the browser editor — compile and run against the test harness, no setup required.