Share on Facebook Share on Twitter Email
Answers.com

SIGUSR1 and SIGUSR2

 
Wikipedia: SIGUSR1 and SIGUSR2
SIGUSR1 and SIGUSR2
Description User-defined signals
Default action Abnormal termination of the process
SA_SIGINFO macros
None

On POSIX-compliant platforms, SIGUSR1 and SIGUSR2 are signals sent to a process to indicate user-defined conditions. The symbolic constants for them are defined in the header file signal.h. Symbolic signal names are used because signal numbers can vary across platforms.

Etymology

SIG is a common prefix for signal names. USR is an abbreviation for user-defined.

Usage

Along with the realtime signals SIGRTMIN through SIGRTMAX, the semantics of SIGUSR1 and SIGUSR2 are not specified by POSIX. Use varies widely from one application to another.

Many applications use USR1 to synchronize internal data between threads and processes, for example by the obsolete LinuxThreads threading library under Linux 2.0 (superseded by the Native POSIX Thread Library). Other applications, such as dd, will print status when given this signal. USR1 is also often used to tell an application to reload config files; for example, sending the Apache HTTP Server a USR1, will ask the server to stop allowing new connections, wait for the current ones to die, reread the config files, re-open its log files, and restart the server, allowing for relatively smooth in-production changes.

See also


Search unanswered questions...
Enter a question here...
Search: All sources Community Q&A Reference topics
 
 
Learn More
SIGALRM
SIGQUIT
SIGSTOP

Post a question - any question - to the WikiAnswers community:

 

Copyrights:

Wikipedia. This article is licensed under the Creative Commons Attribution/Share-Alike License. It uses material from the Wikipedia article "SIGUSR1 and SIGUSR2" Read more