Go to the source code of this file.
Data Structures | |
struct | BashScriptState |
Macros | |
#define | LOG(kind, ...) GNUNET_log (kind, __VA_ARGS__) |
Functions | |
static void | exec_bash_script_cleanup (void *cls) |
The cleanup function of this cmd frees resources the cmd allocated. More... | |
static void | child_completed_callback (void *cls, enum GNUNET_OS_ProcessStatusType type, long unsigned int exit_code) |
Callback which will be called if the setup script finished. More... | |
static void | exec_bash_script_run (void *cls, struct GNUNET_TESTING_Interpreter *is) |
Run method of the command created by the interpreter to wait for another command to finish. More... | |
const struct GNUNET_TESTING_Command | GNUNET_TESTING_cmd_exec_bash_script (const char *label, const char *script, char *const script_argv[], int argc, GNUNET_ChildCompletedCallback cb) |
Command to execute a script synchronously. More... | |
#define LOG | ( | kind, | |
... | |||
) | GNUNET_log (kind, __VA_ARGS__) |
Definition at line 30 of file testing_api_cmd_exec_bash_script.c.
|
static |
The cleanup function of this cmd frees resources the cmd allocated.
Definition at line 75 of file testing_api_cmd_exec_bash_script.c.
References BashScriptState::cwh, GNUNET_assert, GNUNET_ERROR_TYPE_DEBUG, GNUNET_free, GNUNET_log, GNUNET_OK, GNUNET_OS_process_destroy(), GNUNET_OS_process_kill(), GNUNET_OS_process_wait(), GNUNET_wait_child_cancel(), and BashScriptState::start_proc.
Referenced by GNUNET_TESTING_cmd_exec_bash_script().
|
static |
Callback which will be called if the setup script finished.
Definition at line 106 of file testing_api_cmd_exec_bash_script.c.
References BashScriptState::ac, BashScriptState::cb, BashScriptState::cwh, exit_code, GNUNET_ERROR_TYPE_ERROR, GNUNET_log, GNUNET_OS_process_destroy(), GNUNET_TESTING_async_fail(), GNUNET_TESTING_async_finish(), BashScriptState::start_proc, and type.
Referenced by exec_bash_script_run().
|
static |
Run method of the command created by the interpreter to wait for another command to finish.
Definition at line 137 of file testing_api_cmd_exec_bash_script.c.
References BashScriptState::argc, child_completed_callback(), BashScriptState::cwh, GNUNET_asprintf(), GNUNET_break, GNUNET_ERROR_TYPE_DEBUG, GNUNET_ERROR_TYPE_ERROR, GNUNET_log, GNUNET_NO, GNUNET_OS_check_helper_binary(), GNUNET_OS_INHERIT_STD_ERR, GNUNET_OS_installation_get_path(), GNUNET_OS_IPK_DATADIR, GNUNET_OS_start_process_vap(), GNUNET_SYSERR, GNUNET_TESTING_interpreter_fail(), GNUNET_wait_child(), GNUNET_YES, is, LOG, BashScriptState::script, BashScriptState::script_argv, and BashScriptState::start_proc.
Referenced by GNUNET_TESTING_cmd_exec_bash_script().
const struct GNUNET_TESTING_Command GNUNET_TESTING_cmd_exec_bash_script | ( | const char * | label, |
const char * | script, | ||
char *const | script_argv[], | ||
int | argc, | ||
GNUNET_ChildCompletedCallback | cb | ||
) |
Command to execute a script synchronously.
FIXME: is this accurate? How is this limited to BASH scripts or even scripts?
label | Label of the command. |
script | The name of the script. |
script_argv | The arguments of the script. |
Definition at line 196 of file testing_api_cmd_exec_bash_script.c.
References BashScriptState::ac, BashScriptState::argc, BashScriptState::cb, exec_bash_script_cleanup(), exec_bash_script_run(), GNUNET_new, GNUNET_TESTING_command_new(), BashScriptState::script, and BashScriptState::script_argv.