mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-04 16:30:57 +00:00
NOHUP-ify the child process on OSX auto-update.
This commit is contained in:
parent
fe87136870
commit
7e647c5303
@ -259,6 +259,10 @@ public:
|
|||||||
fclose(bash);
|
fclose(bash);
|
||||||
long pid = (long)vfork();
|
long pid = (long)vfork();
|
||||||
if (pid == 0) {
|
if (pid == 0) {
|
||||||
|
setsid(); // detach from parent so that shell isn't killed when parent is killed
|
||||||
|
signal(SIGHUP,SIG_IGN);
|
||||||
|
signal(SIGTERM,SIG_IGN);
|
||||||
|
signal(SIGQUIT,SIG_IGN);
|
||||||
execl("/bin/bash","/bin/bash",bashp,(char *)0);
|
execl("/bin/bash","/bin/bash",bashp,(char *)0);
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user