The trigger-listen Program
Usage
trigger-listen [ -UdDqQv1 -c limit -t timeout -i
interval -g gid -u uid ] path prog
Description
The trigger-listen program listens for input on the fifo path. When it receives input
trigger-listen invokes prog and continues to listen for input on path. An external
program pulls the trigger by writing a byte of data to path.
General Options
- -q: Quiet. Do not print error messages.
- -Q: (Default) Print error messages.
- -v: Verbose. Print both status and error messages.
Listening Options
- -1: Execute prog immediately upon startup.
- -c limit: Execute at most limit copies of prog concurrently. If a trigger
pull occurs while limit copies are running, trigger-listen executes
prog as soon as one of the running copies exits.
- -t timeout: Wait at most timeout seconds for a trigger pull. If timeout
seconds elapse without a trigger pull, then trigger-listen pulls its own
trigger. The default value of timeout is (unsigned int)~0.
- -i interval: Wait at least interval seconds between executions of
prog. If it receives a trigger pull within interval seconds of the last
execution, trigger-listen executes prog when interval seconds have
elapsed. The default value of interval is 0.
- -g gid: Switch group ID to gid after preparing to receive trigger pulls.
- -u uid: Switch user ID to uid after preparing to receive connections.
- -U: Same as -g $GID -u $UID. Typically, $GID and $UID are set by
ttp://cr.yp.to/daemontools/envuidgid.htmlenvuidgid.
- -d: (Default) Delete. Remove and recreate the fifo path upon startup.
- -D: No delete. Do not remove and recreate path upon startup.
Errors
The trigger-listen exits 111 for temporary errors and 100 for permanent
errors.
Copyright © 2009 by SuperScript Technology, Inc. All rights reserved.