Synchronously waiting for signals

At first glance, and the traditional manner in which signaling is taught, it appears that as signals are asynchronous in nature, why would one ever attempt to synchronously block upon signals delivered? Well, the reality is: performing robust signal handling in large projects is a difficult thing to do correctly and consistently. A lot of the complexity stems from the issue of signal-async safety; we are not allowed to use just any API within a signal handler; only a relatively small subset of APIs is considered async-signal-safe and is viable to use. This raises significant hurdles in large programs, and of course, at times, programmers inadvertently cause defects (bugs) (that too, ones that are difficult ...

Get Hands-On System Programming with Linux now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.