-
Is (
SIGRTMIN + 1) safe for inter-process communication? Will it change in different processes? -
Are there any differences to use
sigqueue(2)orkill(2)to send standard signals and real time signals?
If I usesigqueue(2)to send a series ofSIGUSR1(standard signals) and handle them slowly, are there mutiple instances ofSIGUSR1in the queue?
What about usingkill(2)to sendSIGRTMIN(real time signals)? Will they be queued?
Is ( SIGRTMIN + 1 ) safe for inter-process communication? Will it change in
Share
sigqueue() can be used to send only real time signals and kill() can be used to send only standard signals. I haven’t tried sending the wrong signal with either API. But I would expect it to fail with some appropriate errno. Linux doesn’t queue standard signals. Real time signals are queued. The max number of real time signals that can be queued is defined as RLIMIT_SIGPENDING
You can use any real time signal as long as the receiver has the handler setup for the particular signal sender is sending.
EDIT
I was wrong earlier in my answer. It looks like kill() can send real-time signals too. But from the comment in __send_signal() it looks like using kill to send real-time signals might not have the desired effect in some cases, ie: signals may not get queued.