blob: 455d4ecda4b7a589f48d88e5996de178d74520f8 (
plain) (
tree)
|
|
#ifndef __PROCESS_H__
#define __PROCESS_H__
#include <stddef.h>
struct proc_output {
int ec;
char *output;
size_t output_len;
};
/* The exit code is only valid if the functions returns a non-negative number. */
int proc_spawn(const char *args[], int *ec);
/* Similarly, the contents of the proc_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[], struct proc_output *result);
#endif
|