Description | Power failure (System V) |
---|---|
Default action | Abnormal termination of the process (some systems, including Linux[1]), ignored (other systems) |
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 some versions of Linux, SIGINFO is defined as a synonym for SIGPWR, however this is not consistent even between different Linux platforms (most Linux systems do not define SIGINFO at all).[1]
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.
SIGPWR is sent when a power failure is imminent; for example, when the battery is running low on a laptop or a power failure occurs. Upon receiving SIGPWR, an executing program has the opportunity to write its state to permanent storage.
On some operating systems, the Boehm garbage collector uses SIGXCPU and SIGPWR to synchronise cross-thread garbage collection.
|