>> static int s_interrupted = 0;
This needs to be of type "volatile sig_atomic_t". See the third paragraph under "Application Usage" here: sigaction

Also, "printf" is not listed as an "async-signal-safe" function: General Information

I would also add error checking and reporting all all system calls.

What is the end-goal you are trying to achieve? Perhaps there is a better way to achieve that goal that does not involve signal handling.

gg