Archived
1
0

pass in environment

This commit is contained in:
Jeff Becker
2018-05-06 10:21:58 -04:00
parent 720aeee7ee
commit 3b8fd51e53
5 changed files with 10 additions and 9 deletions

View File

@@ -7,7 +7,7 @@
namespace nntpchan
{
ExecFrontend::ExecFrontend(const std::string &fname) : m_exec(fname) {}
ExecFrontend::ExecFrontend(const std::string &fname, char * const* env) : m_Environ(env), m_exec(fname) {}
ExecFrontend::~ExecFrontend() {}
@@ -37,7 +37,7 @@ int ExecFrontend::Exec(std::deque<std::string> args)
}
else
{
int r = execvpe(m_exec.c_str(), (char *const *)cargs, environ);
int r = execvpe(m_exec.c_str(), (char *const *)cargs, m_Environ);
if (r == -1)
{
std::cout << strerror(errno) << std::endl;