Merge pull request #953 from zielmicha/vfork
osproc: increase stack size from 8k to 64k and disable useClone default
This commit is contained in:
commit
00b69192f2
1 changed files with 2 additions and 4 deletions
|
|
@ -22,8 +22,6 @@ else:
|
||||||
|
|
||||||
when defined(linux):
|
when defined(linux):
|
||||||
import linux
|
import linux
|
||||||
when not defined(useFork):
|
|
||||||
const useClone = true
|
|
||||||
|
|
||||||
type
|
type
|
||||||
TProcess = object of TObject
|
TProcess = object of TObject
|
||||||
|
|
@ -663,7 +661,7 @@ elif not defined(useNimRtl):
|
||||||
data.workingDir = workingDir
|
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)
|
pid = startProcessAuxSpawn(data)
|
||||||
else:
|
else:
|
||||||
pid = startProcessAuxFork(data)
|
pid = startProcessAuxFork(data)
|
||||||
|
|
@ -750,7 +748,7 @@ elif not defined(useNimRtl):
|
||||||
var dataCopy = data
|
var dataCopy = data
|
||||||
|
|
||||||
if defined(useClone):
|
if defined(useClone):
|
||||||
const stackSize = 8096
|
const stackSize = 65536
|
||||||
let stackEnd = cast[clong](alloc(stackSize))
|
let stackEnd = cast[clong](alloc(stackSize))
|
||||||
let stack = cast[pointer](stackEnd + stackSize)
|
let stack = cast[pointer](stackEnd + stackSize)
|
||||||
let fn: pointer = startProcessAfterFork
|
let fn: pointer = startProcessAfterFork
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue