From 9386c1f2519abd8b4351fc97419c41182389a1f6 Mon Sep 17 00:00:00 2001 From: sinanmohd Date: Tue, 9 Jul 2024 23:41:48 +0530 Subject: util/vpopen: support for reading stderr --- include/evanix.h | 2 +- include/util.h | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/evanix.h b/include/evanix.h index 48fe110..1e24590 100644 --- a/include/evanix.h +++ b/include/evanix.h @@ -7,7 +7,7 @@ struct evanix_opts_t { bool isflake; bool isdryrun; bool ispipelined; - bool close_stderr_exec; + bool close_unused_fd; char *system; uint32_t max_build; }; 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[]); -- cgit v1.2.3