Who uses POSIX realtime signals and why?

Viewed 12993

I am not being flip I really don't get it. I just read a whole bunch of material on them and I can't figure out the use case. I am not talking talking so much about the API for which the advantages over things like signal() are clear enough. Rather it seems RT signals are meant to be user space generated but to what end? The only use seems to be a primitive IPC but everything points to them being a lousy form of IPC (e.g. awkward, limited information, not particularly efficient, etc).

So where and how are they used?

4 Answers

It's an old question, but still.

POSIX threads on Linux in glibc (NPTL) are implemented using two real time signals. They are hidden from user (by adjusting min/max number constants). All events where library call must be propagated to all threads (like setuid) are done via those: calling thread sends signal to all threads to apply the change, waits for acknowledgement and continues.

Related