osproc: use push stacktrace:off instead of nostackframe
This commit is contained in:
parent
4c09fc110f
commit
1f376d8594
1 changed files with 6 additions and 3 deletions
|
|
@ -606,10 +606,11 @@ elif not defined(useNimRtl):
|
||||||
optionPoStdErrToStdOut: bool
|
optionPoStdErrToStdOut: bool
|
||||||
|
|
||||||
proc startProcessAuxSpawn(data: TStartProcessData): TPid {.tags: [FExecIO, FReadEnv].}
|
proc startProcessAuxSpawn(data: TStartProcessData): TPid {.tags: [FExecIO, FReadEnv].}
|
||||||
|
|
||||||
proc startProcessAuxFork(data: TStartProcessData): TPid {.tags: [FExecIO, FReadEnv].}
|
proc startProcessAuxFork(data: TStartProcessData): TPid {.tags: [FExecIO, FReadEnv].}
|
||||||
|
{.push stacktrace: off, profiler: off.}
|
||||||
proc startProcessAfterFork(data: ptr TStartProcessData) {.
|
proc startProcessAfterFork(data: ptr TStartProcessData) {.
|
||||||
tags: [FExecIO, FReadEnv], noStackFrame, cdecl.}
|
tags: [FExecIO, FReadEnv], cdecl.}
|
||||||
|
{.pop.}
|
||||||
|
|
||||||
proc startProcess(command: string,
|
proc startProcess(command: string,
|
||||||
workingDir: string = "",
|
workingDir: string = "",
|
||||||
|
|
@ -774,7 +775,8 @@ elif not defined(useNimRtl):
|
||||||
|
|
||||||
return pid
|
return pid
|
||||||
|
|
||||||
proc startProcessFail(data: ptr TStartProcessData) {.noStackFrame.} =
|
{.push stacktrace: off, profiler: off.}
|
||||||
|
proc startProcessFail(data: ptr TStartProcessData) =
|
||||||
var error: cint = errno
|
var error: cint = errno
|
||||||
discard write(data.pErrorPipe[writeIdx], addr error, sizeof(error))
|
discard write(data.pErrorPipe[writeIdx], addr error, sizeof(error))
|
||||||
exitnow(1)
|
exitnow(1)
|
||||||
|
|
@ -811,6 +813,7 @@ elif not defined(useNimRtl):
|
||||||
discard execve(data.sysCommand, data.sysArgs, data.sysEnv)
|
discard execve(data.sysCommand, data.sysArgs, data.sysEnv)
|
||||||
|
|
||||||
startProcessFail(data)
|
startProcessFail(data)
|
||||||
|
{.pop}
|
||||||
|
|
||||||
proc close(p: PProcess) =
|
proc close(p: PProcess) =
|
||||||
if p.inStream != nil: close(p.inStream)
|
if p.inStream != nil: close(p.inStream)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue