3 ms·
> The worst offender I have seen was somebody trying to take a pthread lock inside the signal handler. Then trying to fix the "deadlock" by making the lock recu
by gpderetta 10y ago
> The worst offender I have seen was somebody trying to take a pthread lock inside the signal handler. Then trying to fix the "deadlock" by making the lock recursive!! This was so that a pthread_cond_signal could be sent to get the application to exit.
we must have been looking at the same codebase...
for posterity, the correct solution is to use a posix semaphore which is async signal safe.