SIGRTMIN and SIGRTMAX

From Wikipedia, the free encyclopedia

SIGRTMIN
Description First real-time signal
Default action Abnormal termination of the process
SA_SIGINFO macros
None
SIGRTMAX
Description Last real-time signal
Default action Abnormal termination of the process
SA_SIGINFO macros
None

On POSIX-compliant platforms, SIGRTMIN through SIGRTMAX are signals sent to computer programs for user-defined purposes. The symbolic constants for SIGRTMIN and SIGRTMAX are defined in the header file signal.h. Symbolic signal names are used because signal numbers can vary across platforms.

[edit] Etymology

SIG is a common prefix for signal names. RTMIN is an abbreviation for real-time minimum; RTMAX is an abbreviation for real-time maximum.

[edit] Usage

The real-time signals, ranging from SIGRTMIN to SIGRTMAX, are a set of signals that can be used for application-defined purposes.

Because SIGRTMIN may have different values on different Unix-like systems, applications should always refer to the signals in the form SIGRTMIN+n, where n is a constant integer expression.

The real-time signals have a number of properties that differentiate them from other signals and make them suitable for application-defined purposes:

  • Multiple instances of a real-time signal can be sent to a process and all will be delivered.
  • Real-time signals can be accompanied by an integer or pointer value (see sigqueue[1]).
  • Real-time signals are guaranteed to be delivered in the order they were emitted.

On some early versions of Linux 2.6, LinuxThreads uses the first three real-time signals, so threaded applications that support LinuxThreads should not use these signals for their own purposes. Note that the LinuxThreads library has been superseded by the Native POSIX Thread Library (NPTL) and so this caveat is no longer a concern.

[edit] References

  1. ^ sigqueue(2): queue a signal and data to a process – Linux man page
Languages