diff --git a/lib/pure/osproc.nim b/lib/pure/osproc.nim index 454f9eda0c..bc73f7119d 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}: