|
|
|
|
|
by friend-monoid
1623 days ago
|
|
Signals have some wierd properties; a process-directed signal (i.e. the usual one you’d send with kill) chooses an arbitrary thread and invokes the signal handler. You can get in to some weird situations with signals and threads. If you’re using signals as an ipc mechanism, a useful tip is to just block the signal and register a signalfd on poll/epoll to regain control flow control. |
|
... Which of course seems very silly today. Signalfd is a much nicer API to use for new programs!