mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-05 03:53:44 +02:00
Some more changes for slow network leaving on Mac.
This commit is contained in:
parent
c9fe04d8ea
commit
763d1cc3dc
1 changed files with 9 additions and 10 deletions
|
@ -214,19 +214,9 @@ MacEthernetTap::~MacEthernetTap()
|
||||||
|
|
||||||
Mutex::Lock _gl(globalTapCreateLock);
|
Mutex::Lock _gl(globalTapCreateLock);
|
||||||
::write(_shutdownSignalPipe[1],"\0",1); // causes thread to exit
|
::write(_shutdownSignalPipe[1],"\0",1); // causes thread to exit
|
||||||
::close(_shutdownSignalPipe[0]);
|
|
||||||
::close(_shutdownSignalPipe[1]);
|
|
||||||
|
|
||||||
int ec = 0;
|
int ec = 0;
|
||||||
::kill(_agentPid,SIGKILL);
|
::kill(_agentPid,SIGKILL);
|
||||||
|
|
||||||
::close(_agentStdin);
|
|
||||||
::close(_agentStdout);
|
|
||||||
::close(_agentStderr);
|
|
||||||
::close(_agentStdin2);
|
|
||||||
::close(_agentStdout2);
|
|
||||||
::close(_agentStderr2);
|
|
||||||
|
|
||||||
::waitpid(_agentPid,&ec,0);
|
::waitpid(_agentPid,&ec,0);
|
||||||
|
|
||||||
args[0] = "/sbin/ifconfig";
|
args[0] = "/sbin/ifconfig";
|
||||||
|
@ -496,6 +486,15 @@ void MacEthernetTap::threadMain()
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
::close(_agentStdin);
|
||||||
|
::close(_agentStdout);
|
||||||
|
::close(_agentStderr);
|
||||||
|
::close(_agentStdin2);
|
||||||
|
::close(_agentStdout2);
|
||||||
|
::close(_agentStderr2);
|
||||||
|
::close(_shutdownSignalPipe[0]);
|
||||||
|
::close(_shutdownSignalPipe[1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MacEthernetTap::setDns(const char *domain, const std::vector<InetAddress> &servers)
|
void MacEthernetTap::setDns(const char *domain, const std::vector<InetAddress> &servers)
|
||||||
|
|
Loading…
Add table
Reference in a new issue