4 ms·
I had the opposite experience yesterday. A colleague and I were tracking down a rare race condition that became more likely with more threads. A signal handler
by moconnor 14y ago
I had the opposite experience yesterday. A colleague and I were tracking down a rare race condition that became more likely with more threads. A signal handler was being re-entered, which the man page suggested shouldn't happen because by default the signal is blocked during handler execution.
Because this was Linux, we were able to read the kernel source to see what actually happens. It turns out that the signal is only blocked for the current thread, and Linux will deliver it to the first unblocked thread instead.
This misunderstanding also came from a less explicit API doc, although not outright incorrect. But because we had full stack source we didn't need guesswork, a good night's sleep or inspiration. Just curiosity and persistence.
There's a zen-like calm to knowing you can always, always follow a bug through the entire system, that everything happens for a reason and you can open an editor and see what those reasons are.
I will miss this deeply if I ever return to closed-platform development.
- unwind 14y agoDid you submit a patch for the documentation to make this particular more clear?