Skip to content
Better HN
Top
New
Best
Ask
Show
Jobs
Search
⌘K
undefined | Better HN
0 points
rwmj
1y ago
0 comments
Share
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.
0 comments
default
newest
oldest
cesarb
1y ago
> either set a global variable
IIRC, the rule is also that said global variable must have the type "volatile sig_atomic_t".
j
/
k
navigate · click thread line to collapse