exec_script
Purpose:
-
Execute a specified script file in response to a start event from gp_test and return the script’s exit status to indicate success or failure.
Enter:
-
exec_script <prio> <strt_evnt> <stp_evnt> <reply_evnt> <proc_num> <mode_num> <call_proc> <script_file> [arg1] [arg2]…
Where:
-
prio
Specify the task priority.
strt_evnt
Specify the start event name.
stp_evnt
Specify the stop event name.
reply_evnt
Specify the reply event name.
proc_num
Specify the procedure number. (not used)
mode_num
Specify the mode number. (not used)
call_proc
Specify the procedure that called the task. (not used)
script_file
Specify the script file to execute.
arg1, arg2
Optional. Specify an additional argument(s) for the specified script_file.
Example:
-
@AUXILIARY_TASK AT_START MODE_TERMINATE 99 /cyflex/bin/exec_script “my_script READ count”
Notes:
-
The program ensures correct handling of the script’s exit status by resetting the SIGCHLD signal to default.
-
The following is an example specification that should be placed in a gp_test procedure. If ‘my_script’ exits with an ‘exit 0’, then the ‘success_path’ would be the next mode executed in the the gp_test procedure. However, if ‘my_script exits with an ‘exit 7’, then the ‘failure_path’ would be the next mode executed by the procedure.
@AUXILIARY_TASK
#start_type success_path failure_path
AT_START MODE_TERMINATE 99#task pathname “command line”
/cyflex/bin/exec_script “/specs/cmds/my_script READ count”
-