diff options
Diffstat (limited to 'lib/pure/osproc.nim')
-rw-r--r-- | lib/pure/osproc.nim | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/pure/osproc.nim b/lib/pure/osproc.nim index 07429b9a9..71d3d9c72 100644 --- a/lib/pure/osproc.nim +++ b/lib/pure/osproc.nim @@ -280,7 +280,7 @@ proc execProcesses*(cmds: openArray[string], ## executes the commands `cmds` in parallel. Creates `n` processes ## that execute in parallel. The highest return value of all processes ## is returned. Runs `beforeRunEvent` before running each command. - when defined(posix): + when false: # poParentStreams causes problems on Posix, so we simply disable it: var options = options - {poParentStreams} @@ -617,6 +617,7 @@ when defined(Windows) and not defined(useNimRtl): var res: int32 discard getExitCodeProcess(p.fProcessHandle, res) result = res + p.exitStatus = res discard closeHandle(p.fProcessHandle) proc peekExitCode(p: Process): int = @@ -625,6 +626,7 @@ when defined(Windows) and not defined(useNimRtl): else: var res: int32 discard getExitCodeProcess(p.fProcessHandle, res) + if res == 0: return p.exitStatus return res proc inputStream(p: Process): Stream = |