Hacker News new | past | comments | ask | show | jobs | submit login

If your program has an async loop (select or poll etc.) then you need to know about the self-pipe trick for avoiding problems with signals. https://cr.yp.to/docs/selfpipe.html



The article explicitly mentioned signalfd, which is a less hackish way of doing the same.


signalfd() is less portable and has caveats around signal masks and subprocesses that you can avoid with the self-pipe trick.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: