3 ms·
Well fair enough, I stand corrected about "misuse" of signals in certain cases. Nonetheless, non-cooperative preemption is a useful (though oft maligned) tool.
by d110af5ccf 5y ago
Well fair enough, I stand corrected about "misuse" of signals in certain cases. Nonetheless, non-cooperative preemption is a useful (though oft maligned) tool. The things you describe aren't actually problems with signals but rather other APIs that force you to use them.
I'm curious. While it does add a (very small) bit of complexity, can you not just spawn a single sacrificial thread for receiving SIGCHLD and set dispositions accordingly? Then just use standard concurrency primitives to communicate with that thread in whatever way you'd like.