From 097abe013d7430d5122d774d83a5e3b6256cdc45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliver=20St=C3=B6neberg?= Date: Fri, 4 Dec 2020 08:07:14 +0100 Subject: [PATCH] perform all tasks in each loop execution in ThreadExecutor::check() (#2932) --- cli/threadexecutor.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/cli/threadexecutor.cpp b/cli/threadexecutor.cpp index 0ac8de7c2..8bc57be45 100644 --- a/cli/threadexecutor.cpp +++ b/cli/threadexecutor.cpp @@ -244,7 +244,8 @@ unsigned int ThreadExecutor::check() pipeFile[pipes[0]] = iFile->first; ++iFile; } - } else if (!rpipes.empty()) { + } + if (!rpipes.empty()) { fd_set rfds; FD_ZERO(&rfds); for (std::list::const_iterator rp = rpipes.begin(); rp != rpipes.end(); ++rp) @@ -284,7 +285,8 @@ unsigned int ThreadExecutor::check() ++rp; } } - } else if (!childFile.empty()) { + } + if (!childFile.empty()) { int stat = 0; pid_t child = waitpid(0, &stat, WNOHANG); if (child > 0) { @@ -308,7 +310,8 @@ unsigned int ThreadExecutor::check() reportInternalChildErr(childname, oss.str()); } } - } else { + } + if (iFile == mFiles.end() && iFileSettings == mSettings.project.fileSettings.end() && rpipes.empty() && childFile.empty()) { // All done break; }