|
Pharos 0.7.23
Modern Web Framework & Web App Hosting Service.
|
Declares child-process capture helpers. More...
#include <stddef.h>Go to the source code of this file.
Functions | |
Process capture helpers | |
| int | capture_execv_output_native (char *const argv[], char **output, size_t *output_len) |
| Executes a process and captures its combined output. | |
| int | capture_execv_output_env_native (char *const argv[], const char *env_keys[], const char *env_values[], size_t env_count, char **output, size_t *output_len) |
| Executes a process with injected environment values and captures its output. | |
| int | capture_execv_output_split_env_native (char *const argv[], const char *env_keys[], const char *env_values[], size_t env_count, char **stdout_output, size_t *stdout_len, char **stderr_output, size_t *stderr_len) |
| Executes a process with injected environment values and captures stdout and stderr separately. | |
| int | run_process_capture_native (char *const argv[], char **output) |
| Executes a process and captures its combined output text. | |
Declares child-process capture helpers.
Definition in file native_process_capture.h.
| int capture_execv_output_env_native | ( | char *const | argv[], |
| const char * | env_keys[], | ||
| const char * | env_values[], | ||
| size_t | env_count, | ||
| char ** | output, | ||
| size_t * | output_len ) |
Executes a process with injected environment values and captures its output.
| argv | Null-terminated argv array for the child process. |
| env_keys | Environment variable names to set. |
| env_values | Environment variable values paired with env_keys. |
| env_count | Number of environment pairs to apply. |
| output | Destination for the allocated output buffer. |
| output_len | Optional destination for the output length. |
Definition at line 277 of file native_process_capture.c.
References buffer_append(), buffer_free(), buffer_init(), capture_execv_output_split_env_native(), Buffer::data, and Buffer::len.
Referenced by capture_execv_output_native(), maybe_seed_app_state_native(), and shell_runtime_command_capture_native().
| int capture_execv_output_native | ( | char *const | argv[], |
| char ** | output, | ||
| size_t * | output_len ) |
Executes a process and captures its combined output.
| argv | Null-terminated argv array for the child process. |
| output | Destination for the allocated output buffer. |
| output_len | Optional destination for the output length. |
Definition at line 313 of file native_process_capture.c.
References capture_execv_output_env_native().
Referenced by build_dev_docs_directory_native(), capture_checksum_output_runtime(), and run_process_capture_native().
| int capture_execv_output_split_env_native | ( | char *const | argv[], |
| const char * | env_keys[], | ||
| const char * | env_values[], | ||
| size_t | env_count, | ||
| char ** | stdout_output, | ||
| size_t * | stdout_len, | ||
| char ** | stderr_output, | ||
| size_t * | stderr_len ) |
Executes a process with injected environment values and captures stdout and stderr separately.
| argv | Null-terminated argv array for the child process. |
| env_keys | Environment variable names to set. |
| env_values | Environment variable values paired with env_keys. |
| env_count | Number of environment pairs to apply. |
| stdout_output | Destination for the allocated stdout buffer. |
| stdout_len | Optional destination for the stdout length. |
| stderr_output | Destination for the allocated stderr buffer. |
| stderr_len | Optional destination for the stderr length. |
Definition at line 121 of file native_process_capture.c.
References append_pipe_to_buffer(), buffer_free(), buffer_init(), build_child_env_native(), Buffer::data, environ, free_child_env_native(), and Buffer::len.
Referenced by capture_execv_output_env_native(), and spawn_app_request().
| int run_process_capture_native | ( | char *const | argv[], |
| char ** | output ) |
Executes a process and captures its combined output text.
| argv | Null-terminated argv array for the child process. |
| output | Destination for the allocated output buffer. |
Definition at line 317 of file native_process_capture.c.
References capture_execv_output_native().
Referenced by handle_native_deploy_package_deb_command(), native_capture_trimmed(), and native_capture_trimmed().