From 440b55a44a82fa4e6b1d17e36c46d517d2b06cab Mon Sep 17 00:00:00 2001 From: Gleb <137567568+darkestpigeon@users.noreply.github.com> Date: Mon, 6 Oct 2025 22:22:32 +0200 Subject: [PATCH] fix spawn not used on linux (#25206) Subj, among other things slows down the compilation of large projects on linux significantly. --- lib/pure/osproc.nim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/pure/osproc.nim b/lib/pure/osproc.nim index e7f82faceb..5718efb51c 100644 --- a/lib/pure/osproc.nim +++ b/lib/pure/osproc.nim @@ -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)