Orb
The Launcher (Process Launcher) is used to execute a binary or perl program (possibly remotely). A MO (message object) of type 6, code 3, and containing the field "runMe" (the command line to be executed) is sent to the launcher. It will fork a copy of itself, redirecting the child's stdout and stderr to sockets which the parent captures, then execute the requested command line. The output from the child process is captured and when the child completes, is placed in a response message field named "output". The response is then returned to the caller.
By default, programs run under Launcher must output #STOP at the end of their execution to signify to the launcher that all output is complete. If a process ends before #STOP is found, Launcher will execute the process 2 more times (for a total of 3 times). If #STOP is never found, the response MO will have all output in 1 or more "output" fields, and status equal to -1.
If executing a program that does not output #STOP, it is necessary to also supply the numeric field "RetryCnt". This field tells Launcher to execute the process a user-specified number of times, instead of the default, 3. By specifying this configuration field in the requesting MO, #STOP is ignored, the response MO will have any output in 1 or more "output" fields, and status equal to 0.
The launcher may be used, in cooperation with the router, to execute commands on remote systems. The intended use is to run remote processes in response to cgi events.
WATTIME | The time in milliseconds to wait for the child process to complete execution. If the time expires, an error is returned to the caller. |
EXEPATH | The path to be used to find the executables. |
EXEDIR | The directory to change to before executing a command. |