3 ms·
In the past I have used a non-blocking pre-allocated ring buffer to hold signal information, so that the sig handler is not held for too long. Using sem_post, i
by sriram_malhar 3y ago
In the past I have used a non-blocking pre-allocated ring buffer to hold signal information, so that the sig handler is not held for too long. Using sem_post, it wakes up a separate thread (waiting using sem_wait). This has been quite pain-free, but not entirely sure how to smoke out bugs in the system.