O'Reilly logo

Hands-On System Programming with Linux by Kaiwan N Billimoria

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Real time signals and priority

The POSIX standard, and the Linux documentation, states that when multiple real time signals of different types are pending delivery to a process (that is the process is blocking them); then, at some point, when the process's signal mask is unblocked (thereby allowing the signals to be delivered), the signals are indeed delivered in priority order: lowest signal number to highest signal number.

Let's test this: we write a program that traps and blocks upon the delivery of three real time signals: {SIGRTMAX-5, SIGRTMAXSIGRTMIN+5}. (Have a look at the output of kill -l; their integer values are {59, 64, 39} respectively.)

Importantly, our program will, at the time of sigaction(2), use the sigfillset(3) convenience ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required