the perils of pause(2) (
from tedu to programming on 04 Mar 2024 05:32

I recently had a bug in a simple program that has a form I've seen a lot in the last few years: loops and signal handling without masking. The worst thing about these kinds of bugs is that they don't rear their heads immediately – they fall into the class of "huh, it's blocked in a syscall and I'm sure it should have woken up" bugs. Let's look at the problem and then how to lint it.

#c #programming #unix

threaded - newest