2
0
mirror of https://github.com/boostorg/process.git synced 2026-01-20 04:42:24 +00:00

Compare commits

..

8 Commits

Author SHA1 Message Date
Jackarain
9561ebad1c Fix mingw cross-compile 2024-07-31 08:19:56 +08:00
Klemens Morgenstern
755a3ec78d fixed dll symbokl export on windows & clean up jamfile. 2024-07-24 10:12:10 +08:00
Klemens Morgenstern
5f80218655 added CLOSE_RANGE_UNSHARE defined for syscall of close_range. 2024-07-20 08:25:10 +08:00
Ruben Perez
3719df39cd Alpine-Linux CI 2024-07-20 08:25:10 +08:00
Klemens Morgenstern
67a2f97633 fixes include of gnu/libc-version.h
closes #386
2024-07-19 09:17:06 +08:00
Klemens Morgenstern
8b3e90234b b2 link fixes. 2024-07-12 09:03:08 +08:00
Klemens Morgenstern
8044857bb9 c++14 constexpr fixes for environment_win. 2024-07-12 09:03:08 +08:00
zhixingchen
414d0d6b84 FIX: fix the function call with error code 2024-07-04 19:17:17 +08:00
12 changed files with 58 additions and 18 deletions

View File

@@ -141,6 +141,43 @@ jobs:
cd ../boost-root
./b2 -j3 libs/$LIBRARY/test toolset=${{matrix.toolset}} cxxstd=${{matrix.cxxstd}} variant=debug,release
alpine-linux:
runs-on: ubuntu-latest
container:
image: alpine:3.20.1
steps:
- name: Install packages
run: apk add g++ git python3 linux-headers
- uses: actions/checkout@v4
- name: Setup Boost
run: |
echo GITHUB_REPOSITORY: $GITHUB_REPOSITORY
LIBRARY=${GITHUB_REPOSITORY#*/}
echo LIBRARY: $LIBRARY
echo "LIBRARY=$LIBRARY" >> $GITHUB_ENV
echo GITHUB_BASE_REF: $GITHUB_BASE_REF
echo GITHUB_REF: $GITHUB_REF
REF=${GITHUB_BASE_REF:-$GITHUB_REF}
REF=${REF#refs/heads/}
echo REF: $REF
BOOST_BRANCH=develop && [ "$REF" == "master" ] && BOOST_BRANCH=master || true
echo BOOST_BRANCH: $BOOST_BRANCH
cd ..
git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root
cd boost-root
cp -r $GITHUB_WORKSPACE/* libs/$LIBRARY
git submodule update --init tools/boostdep
python3 tools/boostdep/depinst/depinst.py --git_args "--jobs 3" $LIBRARY
./bootstrap.sh
./b2 -d0 headers
- name: Run tests
run: |
cd ../boost-root
./b2 -j3 libs/$LIBRARY/test toolset=gcc cxxstd=23 variant=debug,release
windows:
strategy:
fail-fast: false

View File

@@ -57,7 +57,7 @@ else()
endif()
if (WIN32)
target_link_libraries(boost_process PUBLIC ntdll shell32 Advapi32 user32)
target_link_libraries(boost_process PUBLIC ntdll shell32 advapi32 user32)
endif()
if(BUILD_SHARED_LIBS)

View File

@@ -43,9 +43,10 @@ alias process_sources
if [ os.name ] = NT
{
lib shell32 ;
lib Advapi32 ;
lib Ntdll ;
lib advapi32 ;
lib ntdll ;
lib user32 ;
explicit shell32 advapi32 ntdll user32 ;
}
lib boost_process
@@ -55,11 +56,10 @@ lib boost_process
<boost.process.fs>boost:<library>/boost//filesystem
<target-os>windows:<library>shell32
<target-os>windows:<library>user32
<target-os>windows:<library>Ntdll
<target-os>windows:<library>Advapi32
<target-os>windows:<library>ntdll
<target-os>windows:<library>advapi32
: usage-requirements
<link>shared:<define>BOOST_PROCESS_DYN_LINK=1
<boost.process.fs>boost:<library>/boost//filesystem
;
boost-install boost_process ;
boost-install boost_process ;

View File

@@ -63,7 +63,6 @@ doxygen reference_v2
\"BOOST_PROCESS_V2_END_NAMESPACE= } } }\" \\
BOOST_PROCESS_V2_NAMESPACE=boost::process::v2 \\
BOOST_PROCESS_V2_DECL \\
BOOST_PROCESS_V2_SOURCE \\
BOOST_PROCESS_V2_INITFN_AUTO_RESULT_TYPE(x,y)=deduced \\
BOOST_PROCESS_V2_COMPLETION_TOKEN_FOR(X)=Token \\
BOOST_PROCESS_V2_DEFAULT_COMPLETION_TOKEN_TYPE(E)=DEFAULT_TYPE \\

View File

@@ -154,8 +154,8 @@ namespace filesystem = boost::filesystem;
BOOST_PROCESS_V2_END_NAMESPACE
#if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_PROCESS_V2_DYN_LINK)
#if defined(BOOST_PROCESS_V2_SOURCE)
#if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_PROCESS_DYN_LINK)
#if defined(BOOST_PROCESS_SOURCE)
#define BOOST_PROCESS_V2_DECL BOOST_SYMBOL_EXPORT
#else
#define BOOST_PROCESS_V2_DECL BOOST_SYMBOL_IMPORT

View File

@@ -329,7 +329,7 @@ struct default_launcher
Args && args,
Inits && ... inits ) -> basic_process<typename ExecutionContext::executor_type>
{
return (*this)(context.get_executor(), executable, std::forward<Args>(args), std::forward<Inits>(inits)...);
return (*this)(context.get_executor(), ec, executable, std::forward<Args>(args), std::forward<Inits>(inits)...);
}
template<typename Executor, typename Args, typename ... Inits>

View File

@@ -44,7 +44,7 @@ struct fork_and_forget_launcher : default_launcher
Args && args,
Inits && ... inits ) -> basic_process<typename ExecutionContext::executor_type>
{
return (*this)(context.get_executor(), executable, std::forward<Args>(args), std::forward<Inits>(inits)...);
return (*this)(context.get_executor(), ec, executable, std::forward<Args>(args), std::forward<Inits>(inits)...);
}
template<typename Executor, typename Args, typename ... Inits>

View File

@@ -49,7 +49,7 @@ struct pdfork_launcher : default_launcher
Args && args,
Inits && ... inits ) -> basic_process<typename ExecutionContext::executor_type>
{
return (*this)(context.get_executor(), executable, std::forward<Args>(args), std::forward<Inits>(inits)...);
return (*this)(context.get_executor(), ec, executable, std::forward<Args>(args), std::forward<Inits>(inits)...);
}
template<typename Executor, typename Args, typename ... Inits>

View File

@@ -46,7 +46,7 @@ struct vfork_launcher : default_launcher
Args && args,
Inits && ... inits ) -> basic_process<typename ExecutionContext::executor_type>
{
return (*this)(context.get_executor(), executable, std::forward<Args>(args), std::forward<Inits>(inits)...);
return (*this)(context.get_executor(), ec, executable, std::forward<Args>(args), std::forward<Inits>(inits)...);
}
template<typename Executor, typename Args, typename ... Inits>

View File

@@ -52,7 +52,7 @@ struct as_user_launcher : default_launcher
Args && args,
Inits && ... inits ) -> basic_process<typename ExecutionContext::executor_type>
{
return (*this)(context.get_executor(), executable, std::forward<Args>(args), std::forward<Inits>(inits)...);
return (*this)(context.get_executor(), ec, executable, std::forward<Args>(args), std::forward<Inits>(inits)...);
}
template<typename Executor, typename Args, typename ... Inits>
@@ -133,4 +133,4 @@ struct as_user_launcher : default_launcher
}
BOOST_PROCESS_V2_END_NAMESPACE
#endif // BOOST_PROCESS_V2_WINDOWS_AS_USER_LAUNCHER_HPP
#endif // BOOST_PROCESS_V2_WINDOWS_AS_USER_LAUNCHER_HPP

View File

@@ -9,7 +9,7 @@
#include <boost/process/v2/error.hpp>
#if defined(BOOST_PROCESS_V2_WINDOWS)
#include <Windows.h>
#include <windows.h>
#endif
BOOST_PROCESS_V2_BEGIN_NAMESPACE

View File

@@ -47,7 +47,7 @@ int fdwalk(int (*func)(void *, int), void *cd);
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,11,0) // kernel has close_range
#include <gnu/libc-version.h>
// version is included by stdlib.h #include <gnu/libc-version.h>
#if (__GLIBC__ >= 2 && __GLIBC_MINOR__ >= 34) // glibc is compiled with close_range support
// https://man7.org/linux/man-pages/man2/close_range.2.html
@@ -60,6 +60,10 @@ int fdwalk(int (*func)(void *, int), void *cd);
#if defined(SYS_close_range)
#define BOOST_PROCESS_V2_HAS_CLOSE_RANGE 1
#if !defined(CLOSE_RANGE_UNSHARE)
#define CLOSE_RANGE_UNSHARE 2
#endif
int close_range(unsigned int first, unsigned int last, int flags)
{
return ::syscall(SYS_close_range, first, last, flags);