diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pure/osproc.nim | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/pure/osproc.nim b/lib/pure/osproc.nim index 9284e823a..e88680463 100644 --- a/lib/pure/osproc.nim +++ b/lib/pure/osproc.nim @@ -1416,6 +1416,8 @@ elif not defined(useNimRtl): tmspec.tv_nsec = (timeout * 1_000_000) try: + if not running(p): + return exitStatusLikeShell(p.exitStatus) if clock_gettime(CLOCK_REALTIME, stspec) == -1: raiseOSError(osLastError()) while true: |