diff options
author | wt <iwangtongi@163.com> | 2015-11-10 11:13:04 +0800 |
---|---|---|
committer | wt <iwangtongi@163.com> | 2015-11-10 11:13:04 +0800 |
commit | 696b89c1117a69531a861ed3980f86d6ad95acf6 (patch) | |
tree | f0e40806606352e2b939d84c73b2345893714272 /lib/pure | |
parent | 60e5a2b2f53c0bfaa57a48f53b0b3dfcca1bef76 (diff) | |
download | Nim-696b89c1117a69531a861ed3980f86d6ad95acf6.tar.gz |
Fix osproc.close
Diffstat (limited to 'lib/pure')
-rw-r--r-- | lib/pure/osproc.nim | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/pure/osproc.nim b/lib/pure/osproc.nim index de9e63909..7a1e14a57 100644 --- a/lib/pure/osproc.nim +++ b/lib/pure/osproc.nim @@ -937,9 +937,10 @@ elif not defined(useNimRtl): if p.inStream != nil: close(p.inStream) if p.outStream != nil: close(p.outStream) if p.errStream != nil: close(p.errStream) - discard close(p.inHandle) - discard close(p.outHandle) - discard close(p.errHandle) + if poParentStreams notin p.options: + discard close(p.inHandle) + discard close(p.outHandle) + discard close(p.errHandle) proc suspend(p: Process) = if kill(p.id, SIGSTOP) != 0'i32: raiseOsError(osLastError()) |