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-run.cxx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'libbutl/process-run.cxx') diff --git a/libbutl/process-run.cxx b/libbutl/process-run.cxx index ce5ab20..9c857d0 100644 --- a/libbutl/process-run.cxx +++ b/libbutl/process-run.cxx @@ -12,16 +12,20 @@ using namespace std; namespace butl { process - process_start (const dir_path& cwd, + process_start (const dir_path* cwd, const process_path& pp, const char* cmd[], + const char* const* envvars, int in, int out, int err) { try { - return process (cwd.string ().c_str (), pp, cmd, in, out, err); + return process (pp, cmd, + in, out, err, + cwd != nullptr ? cwd->string ().c_str () : nullptr, + envvars); } catch (const process_child_error& e) { -- cgit v1.1