2 ms·
I'm convinced signal handlers are nearly impossible to write without introducing terribly gnarly race conditions.
by klysm 2y ago
I'm convinced signal handlers are nearly impossible to write without introducing terribly gnarly race conditions.
- BoingBoomTschak 2y agoThe presence of signals in UNIX made me reach the following conclusion: event loop should be mandatory (or at least opt-out), something setup in the CRT before main(). Of course, we're not living in such a well-made C world.
- ComputerGuru 2y agoIf you’re lucky enough to structure your entire app in advance to keep in mind how sync signals are delivered, you can ususllly get away with only setting an atomic Boolean, incrementing an atomic int, or setting a binary semaphore.