Y
Hacker News
new
|
ask
|
show
|
jobs
by
rwmj
719 days 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.
1 comments
cesarb
718 days ago
> either set a global variable
IIRC, the rule is also that said global variable must have the type "volatile sig_atomic_t".
link
IIRC, the rule is also that said global variable must have the type "volatile sig_atomic_t".