Skip to content

Commit 36d8ee5

Browse files
authored
Fix, waitpid() should wait for finished process. (#566)
1 parent 7c5cbf0 commit 36d8ee5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

chronos/asyncproc.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -996,7 +996,7 @@ else:
996996
return
997997
if not(isNil(timer)):
998998
clearTimer(timer)
999-
let exitCode = p.peekProcessExitCode().valueOr:
999+
let exitCode = p.peekProcessExitCode(reap = true).valueOr:
10001000
retFuture.fail(newException(AsyncProcessError, osErrorMsg(error)))
10011001
return
10021002
if exitCode == -1:

0 commit comments

Comments
 (0)