The description is aligned with the function
This commit is contained in:
parent
20750cb616
commit
c831300a14
1 changed files with 22 additions and 10 deletions
|
|
@ -775,18 +775,30 @@ cli_set_mode(clixon_handle h,
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Runs a Python script in a new process
|
* @brief Spawns a new process and runs the specified program within it
|
||||||
*
|
*
|
||||||
* @param[in] h Clicon handle
|
* The function creates a new child process and runs the specified program within it.
|
||||||
* @param[in] cvv CLIgen variable vector
|
* Before launching the program in the child process, environment variables taken from cvv are set.
|
||||||
* @param[in] argv function arguments
|
*
|
||||||
* @retval 0 OK
|
* The function checks the parameters passed to it. Situations where at least one function argument
|
||||||
|
* is missing, or when two arguments are present in both the function and the cvv vector are considered invalid.
|
||||||
|
*
|
||||||
|
* Example usage:
|
||||||
|
* @code
|
||||||
|
* run_program_err("Run program"), cli_start_program();
|
||||||
|
* run_program_python3("Run program"), cli_start_program("python3");
|
||||||
|
* run_program_python3_source_arg("Run program"), cli_start_program("python3", "/tmp/test.py");
|
||||||
|
* run_program_python3_source_arg_vector("Run program") <source:rest>("Path program"), cli_start_program("python3");
|
||||||
|
* run_program_python3_source_arg_vector_err("Run program") <source:rest>("Path program"), cli_start_program("python3", "/tmp/test2.py");
|
||||||
|
* run_program_bash("Run program"), cli_start_program("bash");
|
||||||
|
* @endcode
|
||||||
|
*
|
||||||
|
* @param[in] h Clixon handle
|
||||||
|
* @param[in] cvv Vector of command variables
|
||||||
|
* @param[in] argv Function arguments
|
||||||
|
* @retval 0 OK, returns the exit code of the program
|
||||||
* @retval -1 Error
|
* @retval -1 Error
|
||||||
* The function creates a new child process in which the Python script is launched.
|
|
||||||
* In the child process, before launching the script, environment variables are set
|
|
||||||
* taken from cvv.
|
|
||||||
*
|
*
|
||||||
* The function returns the exit code of the Python script, or a value of (-1) on error.
|
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
cli_start_program(clixon_handle h,
|
cli_start_program(clixon_handle h,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue