command
Format
command = "path_to_command"
Description
The command statement specifies the absolute or relative path of the binary or script to execute. This command is mandatory if the task uses the exec() family of functions.
Example
command = "pci-server"
Default
None.
Reserved
nop; If you specify nop, then PLMS won't spawn the
process during the call to exec*().
Multiplicity
Zero or one instance in a task block.
Constraints
-
If the task contains any of the exec*() functions, the command is a mandatory property.
-
The command value is evaluated during runtime of the component. If command is specified in a task, then the task must use one of the exec*() functions at run time.
Depending on how the command is specified, the PATH environment variable is used to search for the binary to run:
-
A command name starting with a slash (an absolute path, e.g., /usr/bin/sleep): this is taken verbatim, no further search is performed.
-
A command not starting with, but containing a
/(a relative path, e.g., bin/true): this is taken as a path relative to PLMS' current directory at the time the command is run. Care needs to be taken when using the current working directory setting, since it affects the starting point of the search for the binary (e.g., if you setcwd = "/var/data"andcommand = "bin/true", then the system attempts to run /var/data/bin/true).
-
A command consisting of a file name only (e.g., pci-server): this is searched for in PLMS's PATH, much like starting a program on a command line. Keep in mind that with PATHs consisting of many components, the time to locate the binary may be longer than with absolute paths.
