Skip to content

Commit

Permalink
Added BOOST_PROCESS_V2_POSIX_FORCE_DISABLE_CLOSE_RANGE
Browse files Browse the repository at this point in the history
Implements #378.
  • Loading branch information
klemens-morgenstern committed Oct 24, 2024
1 parent fae23e6 commit 5a8102c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions build/Jamfile
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ lib boost_process
: requirements <define>BOOST_PROCESS_SOURCE=1
<link>shared:<define>BOOST_PROCESS_DYN_LINK=1
<boost.process.fs>boost:<library>/boost/filesystem//boost_filesystem
<boost.process.disable-close-range>on:<define>BOOST_PROCESS_V2_POSIX_FORCE_DISABLE_CLOSE_RANGE=1
<target-os>windows:<library>shell32
<target-os>windows:<library>user32
<target-os>windows:<library>ntdll
Expand Down
3 changes: 2 additions & 1 deletion src/posix/close_handles.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ int fdwalk(int (*func)(void *, int), void *cd);

#include <linux/version.h>

#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,11,0) // kernel has close_range
// kernel has close_range
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,9,0) && !defined(BOOST_PROCESS_V2_POSIX_FORCE_DISABLE_CLOSE_RANGE)

// version is included by stdlib.h #include <gnu/libc-version.h>
#if (__GLIBC__ >= 2 && __GLIBC_MINOR__ >= 34) // glibc is compiled with close_range support
Expand Down

0 comments on commit 5a8102c

Please sign in to comment.