exec_expect_exit()
Spawn a process and wait for an exit value
Synopsis:
exec_expect_exit( expected_exit_value, timeout )
Description:
The exec_expect_exit() function spawns a process and waits for it to
exit with an expected exit value before processing the next function or task of the
component. If the exit value differs, the function is deemed to have failed. The wait time
is defined by the timeout parameter in milliseconds. The ranges of the
expected_exit_value and timeout are
0 to 255 and 0 to
INT_MAX(2147483647), respectively.
Example:
exec_expect_exit(5, 100)
Multiplicity:
Zero or one instance in a task block.
Constraints:
-
Only one exec_expect_exit() is allowed in a task.
-
If exec_expect_exit() is used, then exec_waitfor_exit() and exec() are not allowed in the same task.
-
If a task has an exec_expect_exit() function, then that task must define the command property.
-
The parser will reject a configuration file if a task has an exec_expect_exit() without a command definition.
-
The user will only use exec_expect_exit() to spawn short-lived processes.
-
If the process spawned by exec_expect_exit() does not exit with the expected value within the specified timeout period, then exec_expect_exit() is deemed to have failed.
-
If exec_expect_exit() is used in start_sequence tasks, the start can be aborted by a stop action during the wait time.
