fix spawn not used on linux (#25206)

Subj, among other things slows down the compilation of large projects on
linux significantly.
This commit is contained in:
Gleb
2025-10-06 22:22:32 +02:00
committed by GitHub
parent 02609f1872
commit 440b55a44a

View File

@@ -945,7 +945,7 @@ elif not defined(useNimRtl):
options: set[ProcessOption]
const useProcessAuxSpawn = declared(posix_spawn) and not defined(useFork) and
not defined(useClone) and not defined(linux)
not (defined(useClone) and defined(linux))
when useProcessAuxSpawn:
proc startProcessAuxSpawn(data: StartProcessData): Pid {.
raises: [OSError], tags: [ExecIOEffect, ReadEnvEffect, ReadDirEffect, RootEffect], gcsafe.}
@@ -1103,7 +1103,7 @@ elif not defined(useNimRtl):
var pid: Pid
var dataCopy = data
when defined(useClone):
when defined(useClone) and defined(linux):
const stackSize = 65536
let stackEnd = cast[clong](alloc(stackSize))
let stack = cast[pointer](stackEnd + stackSize)