summary refs log tree commit diff stats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/pure/osproc.nim1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/pure/osproc.nim b/lib/pure/osproc.nim
index 454f9eda0..bc73f7119 100644
--- a/lib/pure/osproc.nim
+++ b/lib/pure/osproc.nim
@@ -534,6 +534,7 @@ when defined(Windows) and not defined(useNimRtl):
 
     if e != nil: dealloc(e)
     if success == 0:
+      if poInteractive in result.options: close(result)
       const errInvalidParameter = 87.int
       const errFileNotFound = 2.int
       if lastError.int in {errInvalidParameter, errFileNotFound}: