52 int do_stdout,
int do_stderr);
void bg_subprocess_kill(bg_subprocess_t *proc, int signal)
Send a signal to a process.
int bg_subprocess_read_line(int fd, char **ret, int *ret_alloc, int timeout)
Read a line from stdout or stderr of a process.
int bg_system(const char *command)
Run a command as a subprocess.
bg_subprocess_t * bg_subprocess_create(const char *command, int do_stdin, int do_stdout, int do_stderr)
Create a subprocess.
int stdout_fd
Filedescriptor, which is a pipe to the stdout of the process.
Definition: subprocess.h:35
int bg_subprocess_read_data(int fd, uint8_t *ret, int len)
Read data from stdout or stderr of a process.
Subprocess handle.
Definition: subprocess.h:32
int stdin_fd
Filedescriptor, which is a pipe to the stdin of the process.
Definition: subprocess.h:34
int stderr_fd
Filedescriptor, which is a pipe to the stderr of the process.
Definition: subprocess.h:36
void * priv
Internals made opaque.
Definition: subprocess.h:38
int bg_subprocess_close(bg_subprocess_t *proc)
Close a subprocess and free all associated memory.