From 7c4f5e6464a7d9a9c48b4d6773fbb348624cc32e Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Tue, 6 Jun 2017 14:05:38 +0300 Subject: Support passing environment variables to child process --- libbutl/process.ixx | 32 ++++++++++---------------------- 1 file changed, 10 insertions(+), 22 deletions(-) (limited to 'libbutl/process.ixx') diff --git a/libbutl/process.ixx b/libbutl/process.ixx index 9a09487..4bdd438 100644 --- a/libbutl/process.ixx +++ b/libbutl/process.ixx @@ -138,30 +138,18 @@ namespace butl } inline process:: - process (const char* args[], int in, int out, int err) - : process (nullptr, path_search (args[0]), args, in, out, err) {} + process (const char* args[], + int in, int out, int err, + const char* cwd, + const char* const* envvars) + : process (path_search (args[0]), args, in, out, err, cwd, envvars) {} inline process:: - process (const process_path& pp, const char* args[], - int in, int out, int err) - : process (nullptr, pp, args, in, out, err) {} - - inline process:: - process (const char* args[], process& in, int out, int err) - : process (nullptr, path_search (args[0]), args, in, out, err) {} - - inline process:: - process (const process_path& pp, const char* args[], - process& in, int out, int err) - : process (nullptr, pp, args, in, out, err) {} - - inline process:: - process (const char* cwd, const char* args[], int in, int out, int err) - : process (cwd, path_search (args[0]), args, in, out, err) {} - - inline process:: - process (const char* cwd, const char* args[], process& in, int out, int err) - : process (cwd, path_search (args[0]), args, in, out, err) {} + process (const char* args[], + process& in, int out, int err, + const char* cwd, + const char* const* envvars) + : process (path_search (args[0]), args, in, out, err, cwd, envvars) {} inline process:: process (process&& p) -- cgit v1.1