mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-16 22:28:17 +00:00
More netconf work... set ZT_HOME and chdir there on service launch.
This commit is contained in:
@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user