diff options
author | Mark Leyva <maleyva1@users.noreply.github.com> | 2024-07-01 02:42:11 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-01 11:42:11 +0200 |
commit | 288d5c4ac32c27704258a15d365a56dadf38b0e9 (patch) | |
tree | ed893d80cced41d52dbe410607dc5df4ada283cf /lib | |
parent | 4202b606b19f032e2a34056eaa384e46b5f97496 (diff) | |
download | Nim-288d5c4ac32c27704258a15d365a56dadf38b0e9.tar.gz |
fixes #5091; Ensure we don't wait on an exited process on Linux (#23743)
Fixes #5091. Ensure we don't wait on an exited process on Linux
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: |