2 ms·
A rule I try to follow: either set a global variable or write to a self pipe (using the write syscall), and handle the signal in the main loop.
by rwmj 2y ago
A rule I try to follow: either set a global variable or write to a self pipe (using the write syscall), and handle the signal in the main loop.
- cesarb 2y ago> either set a global variable IIRC, the rule is also that said global variable must have the type "volatile sig_atomic_t".