- SIGUSR1 and SIGUSR2
Infobox Computing signal
description = User-defined signals
action = Abnormal termination of the processOnPOSIX -compliant platforms, SIGUSR1 and SIGUSR2 are signals sent tocomputer program s to indicate user-defined conditions. The symbolic constants for them are defined in theheader 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 underLinux 2.0 (superseded by theNative 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 theApache HTTP Server a USR1, will ask the server send to stop allowing new connections, wait for the current ones to die, reread the config files, and restart the server, allowing for relatively smooth in-production changes.ee also
* [http://pauillac.inria.fr/~xleroy/linuxthreads/faq.html#H.4 LinuxThreads and SIGUSR1/SIGUSR2]
Wikimedia Foundation. 2010.