diff options
author | Egor Tensin <egor@tensin.name> | 2024-12-26 12:08:58 +0100 |
---|---|---|
committer | Egor Tensin <egor@tensin.name> | 2024-12-26 12:08:58 +0100 |
commit | 9f40d20e1c97e2c85e26a6a13ccf04e60d9f83f5 (patch) | |
tree | b5a1c96518c96974e53a70e02d4e684efc198bed /src/process.h | |
parent | update DEVELOPMENT.md (diff) | |
download | cimple-9f40d20e1c97e2c85e26a6a13ccf04e60d9f83f5.tar.gz cimple-9f40d20e1c97e2c85e26a6a13ccf04e60d9f83f5.zip |
Diffstat (limited to '')
-rw-r--r-- | src/process.h | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/process.h b/src/process.h index 810010d..965cb5e 100644 --- a/src/process.h +++ b/src/process.h @@ -10,24 +10,25 @@ #include <stddef.h> -struct proc_output { +struct process_output { int ec; unsigned char *data; size_t data_size; }; /* The exit code is only valid if the functions returns a non-negative number. */ -int proc_spawn(const char *args[], const char *envp[], int *ec); +int process_execute(const char *args[], const char *envp[], int *ec); -/* Similarly, the contents of the proc_output structure is only valid if the function returns a +/* Similarly, the contents of the process_output structure is only valid if the function returns a * non-negative number. * * In that case, you'll need to free the output. */ -int proc_capture(const char *args[], const char *envp[], struct proc_output *result); +int process_execute_and_capture(const char *args[], const char *envp[], + struct process_output *result); -int proc_output_create(struct proc_output **); -void proc_output_destroy(struct proc_output *); +int process_output_create(struct process_output **); +void process_output_destroy(struct process_output *); -void proc_output_dump(const struct proc_output *); +void process_output_dump(const struct process_output *); #endif |