diff --git a/include/utils/command.hpp b/include/utils/command.hpp index 60a28601..956e885d 100644 --- a/include/utils/command.hpp +++ b/include/utils/command.hpp @@ -88,7 +88,7 @@ class command : private command>& env = {}); using command::terminate; using command::is_running; using command::wait; diff --git a/src/utils/command.cpp b/src/utils/command.cpp index 7e8d3a9f..fa234788 100644 --- a/src/utils/command.cpp +++ b/src/utils/command.cpp @@ -128,7 +128,7 @@ command::~command() { /** * Execute the command */ -int command::exec(bool wait_for_completion) { +int command::exec(bool wait_for_completion, const vector>& env) { if ((m_forkpid = fork()) == -1) { throw system_error("Failed to fork process"); } @@ -159,7 +159,7 @@ int command::exec(bool wait_for_completion) { } setpgid(m_forkpid, 0); - process_util::exec_sh(m_cmd.c_str()); + process_util::exec_sh(m_cmd.c_str(), env); } else { // Close file descriptors that won't be used by the parent if ((m_stdin[PIPE_READ] = close(m_stdin[PIPE_READ])) == -1) {