SIGXCPU

From Wikipedia, the free encyclopedia

SIGXCPU
Description CPU time limit exceeded (4.2BSD)
Default action Abnormal termination of the process
SA_SIGINFO macros
None

On POSIX-compliant platforms, SIGXCPU is the signal thrown by computer programs when they exceed their allowed rations of CPU time. In source code, SIGXCPU is a symbolic constant 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. XCPU is an abbreviation for exceeded CPU time.

[edit] Usage

SIGXCPU is sent when the total time spent by the processor executing the process's instructions exceeds the allowed value (as determined by the fcntl system call and shell builtin). This is not the same as total elapsed time, as some of the time since the process started will have been spent waiting on I/O and servicing other processes.

Although SIGXCPU will generally cause program termination, it is an advisory signal that can be intercepted or ignored. Under Linux, processes will receive SIGXCPU on exceeding the CPU soft limit, but on exceeding the CPU hard limit they will receive SIGKILL, which cannot be caught.

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


Languages