Different approaches to handling signals at high volume

In conclusion, if you have a scenario in which a high volume of multiple signals of the same type (as well as other signals) are delivered at a rapid pace to the process, we run the risk of losing (or dropping) signals if we use the usual methods. As we have seen, we can successfully handle all signals in several ways, each with their own approaches to signal-handling at high volume—pros and cons as shown in the following table:

Method Pros Cons/Limitations

Use sigfillset(3) just prior to calling sigaction(2) to ensure that while the signal is being handled, all other signals are blocked.

Simple and straightforward approach. Can lead to significant (unacceptable) delays in handling ...

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.