From 95eb2b88e6820e23d74e4a54e9aa4fba5415ec5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Zieli=C5=84ski?= Date: Sun, 23 Feb 2014 21:01:03 +0100 Subject: [PATCH 1/2] osproc: increase stack size from 8k to 64k --- lib/pure/osproc.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pure/osproc.nim b/lib/pure/osproc.nim index 93d737aa69..5c34c5a115 100644 --- a/lib/pure/osproc.nim +++ b/lib/pure/osproc.nim @@ -750,7 +750,7 @@ elif not defined(useNimRtl): var dataCopy = data if defined(useClone): - const stackSize = 8096 + const stackSize = 65536 let stackEnd = cast[clong](alloc(stackSize)) let stack = cast[pointer](stackEnd + stackSize) let fn: pointer = startProcessAfterFork From 6712aa6e38fdab6e250532c622d3191c16c2dc25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Zieli=C5=84ski?= Date: Sun, 23 Feb 2014 21:02:13 +0100 Subject: [PATCH 2/2] osproc: use fork by default on Linux, clone if requested by useClone flag --- lib/pure/osproc.nim | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/pure/osproc.nim b/lib/pure/osproc.nim index 5c34c5a115..0ac01091c1 100644 --- a/lib/pure/osproc.nim +++ b/lib/pure/osproc.nim @@ -22,8 +22,6 @@ else: when defined(linux): import linux - when not defined(useFork): - const useClone = true type TProcess = object of TObject @@ -663,7 +661,7 @@ elif not defined(useNimRtl): data.workingDir = workingDir - when defined(posix_spawn) and not defined(useFork) and not defined(useClone): + when defined(posix_spawn) and not defined(useFork) and not defined(useClone) and not defined(linux): pid = startProcessAuxSpawn(data) else: pid = startProcessAuxFork(data)