1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2025-12-19 17:53:28 +00:00

Add ability to specify detached=true in options

This commit is contained in:
Bryan Roe
2019-05-12 21:39:02 -07:00
parent 88266aa7ad
commit d0fb36d10b
3 changed files with 7 additions and 1 deletions

View File

@@ -936,6 +936,10 @@ ILibProcessPipe_Process ILibProcessPipe_Manager_SpawnProcessEx4(ILibProcessPipe_
{
ignore_result(setuid((uid_t)UID));
}
if (spawnType == ILibProcessPipe_SpawnTypes_POSIX_DETACHED)
{
ignore_result(setsid());
}
while (envvars != NULL && ((char**)envvars)[0] != NULL)
{
setenv(((char**)envvars)[0], ((char**)envvars)[1], 1);