summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2024-06-06 12:33:35 (GMT)
committerKitware Robot <kwrobot@kitware.com>2024-06-06 12:33:56 (GMT)
commite913e7150a0b1103d80b721cb86798d32c227563 (patch)
tree94faed885b04ea1ec8b571fe39eb6f983619fe12 /Source
parentc370593f2e41b2094d6d7f1a1c47cd5d9d371388 (diff)
parentff077af0320611abf024d2c4d05baecb71de705c (diff)
downloadCMake-e913e7150a0b1103d80b721cb86798d32c227563.zip
CMake-e913e7150a0b1103d80b721cb86798d32c227563.tar.gz
CMake-e913e7150a0b1103d80b721cb86798d32c227563.tar.bz2
Merge topic 'ctest-jobserver-fifo-hang' into release-3.30
ff077af032 ctest: Set close-on-exec for jobserver FIFO Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !9580
Diffstat (limited to 'Source')
-rw-r--r--Source/CTest/cmUVJobServerClient.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/Source/CTest/cmUVJobServerClient.cxx b/Source/CTest/cmUVJobServerClient.cxx
index d7d76c9..055b29b 100644
--- a/Source/CTest/cmUVJobServerClient.cxx
+++ b/Source/CTest/cmUVJobServerClient.cxx
@@ -306,6 +306,10 @@ void ImplPosix::ConnectFIFO(const char* path)
if (fd < 0) {
return;
}
+ if (fcntl(fd, F_SETFD, FD_CLOEXEC) == -1) {
+ close(fd);
+ return;
+ }
cm::uv_pipe_ptr connFIFO;
connFIFO.init(this->Loop, 0, this);