From 42f6aae25938f97eae317a2439a660c54a89ef1c Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Fri, 9 May 2014 15:39:51 +0000 Subject: More netconf work... set ZT_HOME and chdir there on service launch. --- node/Service.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'node') diff --git a/node/Service.cpp b/node/Service.cpp index 1e252a84..a43d104a 100644 --- a/node/Service.cpp +++ b/node/Service.cpp @@ -139,6 +139,8 @@ void Service::threadMain() dup2(in[0],STDIN_FILENO); dup2(out[1],STDOUT_FILENO); dup2(err[1],STDERR_FILENO); + setenv("ZT_HOME",_r->homePath.c_str(),1); + chdir(_r->homePath.c_str()); execl(_path.c_str(),_path.c_str(),_r->homePath.c_str(),(const char *)0); exit(-1); } -- cgit v1.2.3