summaryrefslogtreecommitdiff
path: root/node
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2014-05-09 15:39:51 +0000
committerAdam Ierymenko <adam.ierymenko@gmail.com>2014-05-09 15:39:51 +0000
commit42f6aae25938f97eae317a2439a660c54a89ef1c (patch)
tree29a547729d17281957a91816edd8dcbd391334b6 /node
parent99c5fae9dae76f260c641bc4411f38aad24f4ae1 (diff)
downloadinfinitytier-42f6aae25938f97eae317a2439a660c54a89ef1c.tar.gz
infinitytier-42f6aae25938f97eae317a2439a660c54a89ef1c.zip
More netconf work... set ZT_HOME and chdir there on service launch.
Diffstat (limited to 'node')
-rw-r--r--node/Service.cpp2
1 files changed, 2 insertions, 0 deletions
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);
}