[*] NT proceesses: no point in pretending _spawnv is a real thing. this path is just causing defects.

This commit is contained in:
Reece Wilson 2023-09-04 23:46:48 +01:00
parent f53508baa9
commit 876f4439b3

View File

@ -235,10 +235,12 @@ namespace Aurora::Processes
saAttr.nLength = sizeof(SECURITY_ATTRIBUTES); saAttr.nLength = sizeof(SECURITY_ATTRIBUTES);
saAttr.bInheritHandle = TRUE; saAttr.bInheritHandle = TRUE;
#if 0
if (this->type_ == ESpawnType::eSpawnOvermap) if (this->type_ == ESpawnType::eSpawnOvermap)
{ {
return true; return true;
} }
#endif
if (this->process_ != INVALID_HANDLE_VALUE) if (this->process_ != INVALID_HANDLE_VALUE)
{ {
@ -494,13 +496,6 @@ namespace Aurora::Processes
return false; return false;
} }
if (this->type_ == ESpawnType::eSpawnOvermap)
{
_spawnv(_P_OVERLAY, this->startup_.process.c_str(), this->cargs_.data());
SysPushErrorGen("_spawnv didn't overwrite the process map, given {} ({})", this->startup_.process, this->windowsCli_);
return false;
}
PROCESS_INFORMATION processInfo = { 0 }; PROCESS_INFORMATION processInfo = { 0 };
{ {
STARTUPINFOW startupInfo = { 0 }; STARTUPINFOW startupInfo = { 0 };
@ -632,6 +627,13 @@ namespace Aurora::Processes
} }
} }
if (this->type_ == ESpawnType::eSpawnOvermap)
{
AuProcess::Exit(0);
SysPushErrorGen("eSpawnOvermap didn't overwrite the process map, given {} ({})", this->startup_.process, this->windowsCli_);
return false;
}
if (this->type_ == ESpawnType::eSpawnChildProcessWorker) if (this->type_ == ESpawnType::eSpawnChildProcessWorker)
{ {
#if defined(AURORA_PLATFORM_WIN32) #if defined(AURORA_PLATFORM_WIN32)