Skip to content

Commit b505e24

Browse files
committed
refs qorelanguage/qore#4272 added check for already-existing exit code to the wait call with a timeout
1 parent 6511988 commit b505e24

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/processpriv.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -770,6 +770,11 @@ bool ProcessPriv::wait(int64 t, ExceptionSink* xsink) {
770770
return false;
771771
}
772772

773+
// return immediately if we already have an exit code
774+
if (exit_code != -1) {
775+
return true;
776+
}
777+
773778
try {
774779
if (m_process->valid()) {
775780
std::error_code ec;

0 commit comments

Comments
 (0)