Launcher allows unmodified applications to be monitored by the Kick-Off! daemon, kickoffd. Launcher is installed in /usr/local/bin.
Launcher invokes the program specified by its first argument ("the target"), passing it all remaining arguments. Launcher monitors the target until its termination.
When the targe program terminates, Launcher examines the return-code from the target. If it is determined to be successful, Launcher simply exits. If it is determined to be a failure, Launcher notifies kickoffd, which takes appropriate action as set in the "Application Crashes" panel.
You may specify which return values are to be considered successful, and which are to be considered failure.
kickoffd does not interpret shell redirections, so targets which depend on shell redirection of stdin, stdout, and stderr should be placed in a shell script, and the script passed as an argument to Launcher.
Do not use a normal command with a redirection:
launcher target < data_file (will not allow re-launching by kickoffd)
Instead, create a shell-script with the complete target invocation:
#!/bin/sh
target < data_file
and invoke Launcher with that shell-script:
launcher foo.sh
| -f (--failure) <int> | specifiy a failure return code for target. (Default is -1) |
| -h | display usage message |
| -o (--optimism) | treat unexpected return codes as success. |
| -p (--pessimism) | treat unexpected return codes as failure. |
| Note: Pessimism takes precedence over optimism, and is the default. | |
| -s (--success) <int> | specify a success return code for target. (Default is 0) |
| -t (--test) | Test mode. Doesn't connect to kickoffd; useful to view return codes. |
| -v (--verbose) | Generate verbose output. |
Note: You can specify multiple success and multiple failure return values in the parameters. For example,
launcher target -s 1 -s 2 -f -1 -f -8
<target>
<target-arg-1 ... target-arg-n>
launcher <target> <optional target args>