4 #ifndef RZ_UTIL_SUBPROCESS_H
5 #define RZ_UTIL_SUBPROCESS_H
26 #define RZ_SUBPROCESS_STDIN (1 << 0)
27 #define RZ_SUBPROCESS_STDOUT (1 << 1)
28 #define RZ_SUBPROCESS_STDERR (1 << 2)
83 const char *
file,
const char *
args[],
size_t args_size,
84 const char *envvars[],
const char *envvals[],
size_t env_size);
const lzma_allocator const uint8_t size_t uint8_t * out
static static sync static getppid static getegid const char static filename char static len const char char static bufsiz static mask static vfork const void static prot static getpgrp const char static swapflags static arg static fd static protocol static who struct sockaddr static addrlen static backlog struct timeval struct timezone static tz const struct iovec static count static mode const void const struct sockaddr static tolen const char static pathname void static offset struct stat static buf void long static basep static whence static length const void static len static semflg const void static shmflg const struct timespec struct timespec static rem const char static group const void length
RZ_API RzSubprocessOutput * rz_subprocess_drain(RzSubprocess *proc)
@ RZ_SUBPROCESS_BYTESREAD
RZ_API RzSubprocessWaitReason rz_subprocess_wait(RzSubprocess *proc, ut64 timeout_ms)
struct rz_subprocess_opt_t RzSubprocessOpt
RZ_API void rz_subprocess_free(RzSubprocess *proc)
RZ_API ut8 * rz_subprocess_out(RzSubprocess *proc, int *length)
enum rz_process_wait_reason_t RzSubprocessWaitReason
RZ_API RzSubprocess * rz_subprocess_start_opt(RzSubprocessOpt *opt)
RZ_API void rz_subprocess_fini(void)
RZ_API RzSubprocess * rz_subprocess_start(const char *file, const char *args[], size_t args_size, const char *envvars[], const char *envvals[], size_t env_size)
RZ_API void rz_subprocess_output_free(RzSubprocessOutput *out)
struct rz_process_output_t RzSubprocessOutput
RZ_API ut8 * rz_subprocess_err(RzSubprocess *proc, int *length)
enum rz_subprocess_pipe_create_t RzSubprocessPipeCreate
RZ_API ssize_t rz_subprocess_stdin_write(RzSubprocess *proc, const ut8 *buf, size_t buf_size)
RZ_API bool rz_subprocess_init(void)
RZ_API RzStrBuf * rz_subprocess_stdout_read(RzSubprocess *proc, size_t n, ut64 timeout_ms)
rz_subprocess_pipe_create_t
@ RZ_SUBPROCESS_PIPE_NONE
No pipe should be created. It can be used for stdin, stdout and stderr.
@ RZ_SUBPROCESS_PIPE_STDOUT
@ RZ_SUBPROCESS_PIPE_CREATE
Re-use the same pipe as stdout. It can be used for stderr only.
RZ_API int rz_subprocess_ret(RzSubprocess *proc)
RZ_API void rz_subprocess_kill(RzSubprocess *proc)
RZ_API RzStrBuf * rz_subprocess_stdout_readline(RzSubprocess *proc, ut64 timeout_ms)
ut8 * out
< Output generated by the process
int out_len
Error generated by the process.
int ret
True if the process has exited because of a timeout.
ut8 * err
Number of bytes in the err field.
int err_len
Return value (exit code) of the sub-process.
size_t env_size
Specify how to deal with subprocess stdin.
const char * file
< Name of the executable to run. It is searched also in PATH
RzSubprocessPipeCreate stderr_pipe
RzSubprocessPipeCreate stdout_pipe
Specify how to deal with subprocess stderr.
size_t args_size
Names of environment variables that subprocess should have differently from parent.
const char ** envvals
Number of elements contained in both envvars and envvals.
const char ** args
Number of arguments in args array.
RzSubprocessPipeCreate stdin_pipe
Specify how to deal with subprocess stdout.
const char ** envvars
Values of environment variables that subprocess should have differently from parent.
ut64(WINAPI *w32_GetEnabledXStateFeatures)()