linux-sysprog · intermediate · ~15 min
Test a flag bit in the sigaction flags word.
sigaction flags control behaviour. Implement int restarts_syscalls(int flags) returning 1 if the SA_RESTART bit is set, else 0.
#include <signal.h>
int restarts_syscalls(int flags) {
/* TODO */
return 0;
}
Solve this exercise in the browser editor — compile and run against the test harness, no setup required.