Fix, waitpid() should wait for finished process. (#566)

This commit is contained in:
Eugene Kabanov 2025-01-30 13:28:25 +02:00 committed by GitHub
parent 7c5cbf04a6
commit 36d8ee5617
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -996,7 +996,7 @@ else:
return
if not(isNil(timer)):
clearTimer(timer)
let exitCode = p.peekProcessExitCode().valueOr:
let exitCode = p.peekProcessExitCode(reap = true).valueOr:
retFuture.fail(newException(AsyncProcessError, osErrorMsg(error)))
return
if exitCode == -1: