diff options
author | sinanmohd <sinan@sinanmohd.com> | 2024-07-09 23:41:48 +0530 |
---|---|---|
committer | sinanmohd <sinan@sinanmohd.com> | 2024-07-09 23:47:07 +0530 |
commit | 9386c1f2519abd8b4351fc97419c41182389a1f6 (patch) | |
tree | e7b3d7f28839a00fe9a1ade63ccb394b3a209e0d /include/util.h | |
parent | 3c85d4765bc6592043c0dc5adfa377c3db51140b (diff) |
util/vpopen: support for reading stderr
Diffstat (limited to 'include/util.h')
-rw-r--r-- | include/util.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/include/util.h b/include/util.h index 7c15354..1ffe148 100644 --- a/include/util.h +++ b/include/util.h @@ -13,7 +13,13 @@ (cur) = (next); \ } +typedef enum { + VPOPEN_STDERR, + VPOPEN_STDOUT +} vpopen_t; + +int vpopen(FILE **stream, const char *file, char *const argv[], vpopen_t type); + int json_streaming_read(FILE *stream, cJSON **json); -int vpopen(FILE **stream, const char *file, char *const argv[]); int atob(const char *s); int run(const char *file, char *argv[]); |