[*] UNIX Processes: fix overmap regression in (d166a00d) and added support for envblock updates missing in (d166a00d)

This commit is contained in:
Reece Wilson 2023-09-15 16:03:41 +01:00
parent a80524d573
commit 67b047eead

View File

@ -481,7 +481,34 @@ namespace Aurora::Processes
}
#endif
if (this->type_ != ESpawnType::eSpawnOvermap)
{
::setsid();
}
if (!this->startup_.bInheritEnvironmentVariables)
{
try
{
AuList<AuString> keys;
for (const auto &[key, value] : AuProcess::EnvironmentGetAll())
{
keys.push_back(key);
}
AuProcess::EnvironmentRemoveMany(keys);
}
catch (...)
{
SysPanic("Couldn't fork");
}
}
if (this->startup_.environmentVariables.size())
{
SysAssert(AuProcess::EnvironmentSetMany(this->startup_.environmentVariables));
}
#if defined(AURORA_IS_XNU_DERIVED)
if (this->startup_.workingDirectory)