SIGPWR

From Wikipedia, the free encyclopedia

SIGPWR (non-POSIX)
Description: Power failure (System V)
Default action: Abnormal termination of the process
SA_SIGINFO macros
None

On some Unix-like platforms, SIGPWR is the signal sent to computer programs when the system experiences a power failure. The symbolic constant for SIGPWR is defined in the header file signal.h. Symbolic signal names are used because signal numbers can vary across platforms.

On Linux, SIGINFO is a synonym for SIGPWR.

[edit] Etymology

SIG is a common prefix for signal names. PWR is an abbreviation for power. INFO refers to the system informing processes of a critical situation.

[edit] Usage

SIGPWR is sent when a power failure is imminent; for example, when the battery is running low on a laptop or when a power failure forces a server to switch to an uninterruptible power supply. Programs would be expected to synchronise state to permanent storage to ensure that if the system powers off data is not lost.

On some operating systems, the Boehm garbage collector uses SIGXCPU and SIGPWR to synchronise cross-thread garbage collection.

POSIX Signals
SIGABRT | SIGALRM | SIGFPE | SIGHUP | SIGILL | SIGINT | SIGKILL | SIGPIPE | SIGQUIT | SIGSEGV | SIGTERM | SIGUSR1 | SIGUSR2 | SIGCHLD | SIGCONT | SIGSTOP | SIGTSTP | SIGTTIN | SIGTTOU | SIGBUS | SIGPOLL | SIGPROF | SIGSYS | SIGTRAP | SIGURG | SIGVTALRM | SIGXCPU | SIGXFSZ | Realtime Signals are user definable—SIGRTMIN+n through SIGRTMAX.
Common non-POSIX signals and synonyms
SIGIOT | SIGEMT | SIGSTKFLT | SIGIO | SIGCLD | SIGINFO | SIGPWR (SIGINFO) | SIGLOST | SIGWINCH | SIGUNUSED