2
0
mirror of https://github.com/boostorg/process.git synced 2026-01-19 04:22:15 +00:00

Added BOOST_PROCESS_V2_POSIX_FORCE_DISABLE_CLOSE_RANGE

Implements #378.
This commit is contained in:
Klemens Morgenstern
2024-10-25 07:39:16 +08:00
parent 12192d35d3
commit c492c93062
3 changed files with 4 additions and 1 deletions

View File

@@ -8,6 +8,7 @@ require-b2 5.2 ;
import feature : feature ;
feature boost.process.fs : boost std : optional propagated ;
feature boost.process.disable-close-range : on off : optional ;
constant boost_dependencies :
/boost/algorithm//boost_algorithm

View File

@@ -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

View File

@@ -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