From 876f4439b32d04ec31835a47328437a4e89f24ba Mon Sep 17 00:00:00 2001 From: Jamie Reece Wilson Date: Mon, 4 Sep 2023 23:46:48 +0100 Subject: [PATCH] [*] NT proceesses: no point in pretending _spawnv is a real thing. this path is just causing defects. --- Source/Processes/AuProcess.NT.cpp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/Source/Processes/AuProcess.NT.cpp b/Source/Processes/AuProcess.NT.cpp index a55e9503..9dbd7e16 100644 --- a/Source/Processes/AuProcess.NT.cpp +++ b/Source/Processes/AuProcess.NT.cpp @@ -235,10 +235,12 @@ namespace Aurora::Processes saAttr.nLength = sizeof(SECURITY_ATTRIBUTES); saAttr.bInheritHandle = TRUE; + #if 0 if (this->type_ == ESpawnType::eSpawnOvermap) { return true; } + #endif if (this->process_ != INVALID_HANDLE_VALUE) { @@ -494,13 +496,6 @@ namespace Aurora::Processes 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 }; { 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 defined(AURORA_PLATFORM_WIN32)