From 36d8ee5617fbd9747726688fce72fcd215628937 Mon Sep 17 00:00:00 2001 From: Eugene Kabanov Date: Thu, 30 Jan 2025 13:28:25 +0200 Subject: [PATCH] Fix, waitpid() should wait for finished process. (#566) --- chronos/asyncproc.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chronos/asyncproc.nim b/chronos/asyncproc.nim index 572e3828..07f4d063 100644 --- a/chronos/asyncproc.nim +++ b/chronos/asyncproc.nim @@ -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: