Functions | |
int | di_exec_full (const char *path, const char *const argv[], di_io_handler *stdout_handler, di_io_handler *stderr_handler, void *io_user_data, di_process_handler *parent_prepare_handler, void *parent_prepare_user_data, di_process_handler *child_prepare_handler, void *child_prepare_user_data) |
static int | di_exec (const char *path, const char *const argv[]) |
int | di_exec_env_full (const char *path, const char *const argv[], const char *const envp[], di_io_handler *stdout_handler, di_io_handler *stderr_handler, void *io_user_data, di_process_handler *parent_prepare_handler, void *parent_prepare_user_data, di_process_handler *child_prepare_handler, void *child_prepare_user_data) |
static int | di_exec_env (const char *path, const char *const argv[], const char *const envp[]) |
int | di_exec_path_full (const char *file, const char *const argv[], di_io_handler *stdout_handler, di_io_handler *stderr_handler, void *io_user_data, di_process_handler *parent_prepare_handler, void *parent_prepare_user_data, di_process_handler *child_prepare_handler, void *child_prepare_user_data) |
static int | di_exec_path (const char *file, const char *const argv[]) |
int | di_exec_shell_full (const char *const cmd, di_io_handler *stdout_handler, di_io_handler *stderr_handler, void *io_user_data, di_process_handler *parent_prepare_handler, void *parent_prepare_user_data, di_process_handler *child_prepare_handler, void *child_prepare_user_data) |
static int | di_exec_shell (const char *const cmd) |
static int | di_exec_shell_log (const char *const cmd) |
int | di_exec_mangle_status (int status) |
static int | di_execlog (const char *const cmd) __attribute__((deprecated)) |
Variables | |
di_io_handler | di_exec_io_log |
di_process_handler | di_exec_prepare_chdir |
di_process_handler | di_exec_prepare_chroot |
|
execv like call
00082 { 00083 return di_exec_full (path, argv, NULL, NULL, NULL, NULL, NULL, NULL, NULL); 00084 }
|
|
execve like call
00114 { 00115 return di_exec_env_full (path, argv, envp, NULL, NULL, NULL, NULL, NULL, NULL, NULL); 00116 }
|
|
|
execv like call
00203 { 00204 return internal_di_exec (path, false, argv, NULL, stdout_handler, stderr_handler, io_user_data, parent_prepare_handler, parent_prepare_user_data, child_prepare_handler, child_prepare_user_data); 00205 }
|
|
mangle status like sh does it: * if signaled: 128 + signal * else return code 00248 { 00249 if (WIFEXITED (status)) 00250 return WEXITSTATUS (status); 00251 if (WIFSIGNALED (status)) 00252 return 128 + WTERMSIG (status); 00253 if (WIFSTOPPED (status)) 00254 return 128 + WSTOPSIG (status); 00255 return status; 00256 }
|
|
execvp like call
00144 { 00145 return di_exec_path_full (file, argv, NULL, NULL, NULL, NULL, NULL, NULL, NULL); 00146 }
|
|
execvp like call
00213 { 00214 return internal_di_exec (file, true, argv, NULL, stdout_handler, stderr_handler, io_user_data, parent_prepare_handler, parent_prepare_user_data, child_prepare_handler, child_prepare_user_data); 00215 }
|
|
system like call
00172 { 00173 return di_exec_shell_full (cmd, NULL, NULL, NULL, NULL, NULL, NULL, NULL); 00174 }
|
|
system like call
00218 { 00219 const char *const argv[] = { "sh", "-c", cmd, NULL }; 00220 return internal_di_exec ("/bin/sh", false, argv, NULL, stdout_handler, stderr_handler, io_user_data, parent_prepare_handler, parent_prepare_user_data, child_prepare_handler, child_prepare_user_data); 00221 }
|
|
system like call with output via log
00184 { 00185 return di_exec_shell_full (cmd, di_exec_io_log, NULL, NULL, NULL, NULL, NULL, NULL); 00186 }
|
|
00201 { 00202 return di_exec_shell_log (cmd); 00203 }
|
|
logs the output |
|
chdir to user_data
|
|
chroot to user_data
|