Skip to content

ctest: Set close-on-exec for jobserver FIFO

Set the close-on-exec flag to prevent the jobserver FIFO file descriptor from leaking to subprocesses spawned by ctest.

This leak is usually harmless, but can cause make test -jN to hang at the end of the build if a test leaves a background process running with the jobserver FIFO file descriptor open.

See the linked issue for a detailed description and test case for the hang.

Fixes: #26027 (closed)
Backport: release
Manual-backport: release-3.29
Topic-rename: ctest-jobserver-fifo-hang

Edited by Brad King

Merge request reports