on_signal
no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
— | on_signal [2017/07/06 01:48] (current) – created - external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ======Synopsis: | ||
+ | [[on]] [< | ||
+ | |||
+ | ======Description: | ||
+ | This hook is triggered whenever an OS signal is received by the client. | ||
+ | |||
+ | ======Parameters: | ||
+ | |$0 | ||
+ | |$1 | ||
+ | |||
+ | This hook will be triggered twice for each signal, once for the signal number and once for the symbolic name. Using the symbolic name in scripts is preferred, because the signal numbers can vary between operating systems. | ||
+ | |||
+ | It is unclear how to make any sensible use of the signal count parameter, and this should probably be ignored. | ||
+ | |||
+ | ======Examples: | ||
+ | |||
+ | To close and reopen all open log files when a SIGUSR1 signal is received: | ||
+ | |||
+ | on ^signal "USR1 %" { | ||
+ | fe ($logctl(REFNUMS ACTIVE)) logref { | ||
+ | xecho -b Reopening log file $logctl(GET $logref FILENAME) | ||
+ | @ logctl(SET $logref STATUS 0) | ||
+ | @ logctl(SET $logref STATUS 1) | ||
+ | } | ||
+ | } | ||
on_signal.txt · Last modified: 2017/07/06 01:48 by 127.0.0.1