summaryrefslogtreecommitdiffstats
path: root/Source/CTest
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-01-13 21:17:19 (GMT)
committerBrad King <brad.king@kitware.com>2020-01-14 15:29:05 (GMT)
commitd1976cd1f226a6da00dbab1b851202f0c69341db (patch)
tree355a7627df350bb5f3612c84d6e537d4d0a3c104 /Source/CTest
parent2f5eb1800b76288ad3fbd6404b6b08ab26fb9158 (diff)
downloadCMake-d1976cd1f226a6da00dbab1b851202f0c69341db.zip
CMake-d1976cd1f226a6da00dbab1b851202f0c69341db.tar.gz
CMake-d1976cd1f226a6da00dbab1b851202f0c69341db.tar.bz2
CTest: Fix timeout when grandchild keeps pipes open
When a test's process creates its own child and exits, the grandchild may keep pipes open. Fix CTest logic to correctly timeout if the grandchild does not exit and close the pipes before the timeout expires. This was broken by commit b5e21d7d2e (CTest: Re-implement test process handling using libuv, 2017-12-10, v3.11.0-rc1~117^2) which added an unnecessary condition to the timeout handling. Fixes: #20116
Diffstat (limited to 'Source/CTest')
-rw-r--r--Source/CTest/cmProcess.cxx3
1 files changed, 0 insertions, 3 deletions
diff --git a/Source/CTest/cmProcess.cxx b/Source/CTest/cmProcess.cxx
index 2ec9622..cdf899c 100644
--- a/Source/CTest/cmProcess.cxx
+++ b/Source/CTest/cmProcess.cxx
@@ -278,9 +278,6 @@ void cmProcess::OnTimeoutCB(uv_timer_t* timer)
void cmProcess::OnTimeout()
{
- if (this->ProcessState != cmProcess::State::Executing) {
- return;
- }
this->ProcessState = cmProcess::State::Expired;
bool const was_still_reading = !this->ReadHandleClosed;
if (!this->ReadHandleClosed) {