Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

boost 1.87 #418

Merged
merged 28 commits into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
9761be9
Add support for modular build structure. (#389)
grafikrobot Aug 26, 2024
54479a7
remove dllimport from utf8.hpp to fix MSVC build
bebuch Sep 30, 2024
8df45b8
Fix undefined reference to ws2_32
jschueller Aug 31, 2024
642bd7c
removed more faulty V2_DECLs
klemens-morgenstern Oct 24, 2024
211a313
Fix building on OpenBSD
brad0 Aug 24, 2024
f741b0d
[DragonFly BSD] Use Proper CWD From PID Code
time-killer-games Aug 5, 2024
12192d3
Applying @sehe's patch.
klemens-morgenstern Oct 24, 2024
c492c93
Added BOOST_PROCESS_V2_POSIX_FORCE_DISABLE_CLOSE_RANGE
klemens-morgenstern Oct 24, 2024
9f10463
Typo fix.
klemens-morgenstern Oct 24, 2024
46b71d5
Switched #error to ENOTSUP for ext libs. Should help #413
klemens-morgenstern Oct 25, 2024
a96f7a0
Wrapped proc_info.h functions with IOS check. Using the ext functions…
klemens-morgenstern Oct 25, 2024
7ed1648
removed filesystem from the compiled lib.
klemens-morgenstern Oct 25, 2024
894f371
typo fixes.
klemens-morgenstern Oct 25, 2024
928674d
added test async_wait cancellation test.
klemens-morgenstern Oct 25, 2024
eb6b49c
disabled /boost//coroutine dependent tests
klemens-morgenstern Oct 25, 2024
a44fd24
unified cancellation on process.async_wait()
klemens-morgenstern Oct 25, 2024
3695433
remove test_impl lib
klemens-morgenstern Oct 25, 2024
e46a514
replaced deadline_timer with steady_timer.
klemens-morgenstern Oct 25, 2024
fdfb504
add kvm to process target on bsd
klemens-morgenstern Oct 25, 2024
11a0d0d
added pthread to test linking for freebsd
klemens-morgenstern Oct 25, 2024
f218a6a
added pthread to test linking for freebsd on v1 as well.
klemens-morgenstern Oct 25, 2024
e827d14
reduced asio related macro usage.
klemens-morgenstern Oct 27, 2024
941e93b
removed definition of NOMINMAX
klemens-morgenstern Oct 27, 2024
8171281
changed error macros to require a ; at the end.
klemens-morgenstern Oct 27, 2024
8a8ca8b
OpenBSD fix & Solaris fixes
time-killer-games Oct 27, 2024
3ad68a3
[OpenBSD] Add Missing Semicolons (#414)
time-killer-games Oct 29, 2024
7e5dd40
bp2::ext::env() Fixes (#415)
time-killer-games Oct 29, 2024
58586e4
added deprecation notice for v1.
klemens-morgenstern Oct 29, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions build.jam
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Copyright René Ferdinand Rivera Morell 2024
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)

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
/boost/asio//boost_asio
/boost/assert//boost_assert
/boost/config//boost_config
/boost/core//boost_core
/boost/fusion//boost_fusion
/boost/io//boost_io
/boost/iterator//boost_iterator
/boost/move//boost_move
/boost/optional//boost_optional
/boost/system//boost_system
/boost/throw_exception//boost_throw_exception
/boost/tokenizer//boost_tokenizer
/boost/type_index//boost_type_index
/boost/type_traits//boost_type_traits
/boost/utility//boost_utility
/boost/winapi//boost_winapi ;

project /boost/process
: common-requirements
<include>include
: default-build
<boost.process.fs>boost
;

explicit
[ alias boost_process : build//boost_process ]
[ alias all : boost_process example example/v2 test ]
;

call-if : boost-library process
: install boost_process
;

38 changes: 23 additions & 15 deletions build/Jamfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@

import os ;
import feature ;
import ../../config/checks/config : requires ;
import-search /boost/config/checks ;
import config : requires ;

project : requirements
<define>BOOST_ASIO_NO_DEPRECATED
Expand All @@ -15,11 +16,11 @@ project : requirements
<target-os>windows:<define>WIN32_LEAN_AND_MEAN
<target-os>linux:<linkflags>-lpthread
: source-location ../src
: common-requirements
<library>$(boost_dependencies)
<boost.process.fs>std:<define>BOOST_PROCESS_USE_STD_FS=1
;

feature.feature boost.process.fs : boost std : propagated composite ;
feature.compose <boost.process.fs>std : <define>BOOST_PROCESS_USE_STD_FS=1 ;

alias process_sources
: detail/environment_posix.cpp
detail/environment_win.cpp
Expand All @@ -40,26 +41,33 @@ alias process_sources
shell.cpp
;

if [ os.name ] = NT
{
lib shell32 ;
lib advapi32 ;
lib ntdll ;
lib user32 ;
explicit shell32 advapi32 ntdll user32 ;
}
lib shell32 ;
lib advapi32 ;
lib ntdll ;
lib user32 ;
lib ws2_32 ;

lib kvm ;
lib procstat ;

lib boost_process
: process_sources
: requirements <define>BOOST_PROCESS_SOURCE=1
<link>shared:<define>BOOST_PROCESS_DYN_LINK=1
<boost.process.fs>boost:<library>/boost//filesystem
<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
<target-os>windows:<library>advapi32
<target-os>windows:<library>ws2_32
<target-os>bsd:<library>kvm
<target-os>freebsd:<library>kvm
<target-os>freebsd:<library>procstat
<target-os>netbsd:<library>kvm
<target-os>openbsd:<library>kvm
<target-os>solaris:<library>kvm
: usage-requirements
<link>shared:<define>BOOST_PROCESS_DYN_LINK=1
<boost.process.fs>boost:<library>/boost/filesystem//boost_filesystem
;

boost-install boost_process ;
8 changes: 4 additions & 4 deletions doc/Jamfile.jam
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ install images_glob : $(images) : <location>$(BOOST_ROOT)/doc/html/boost_process
import type ;
type.register XMLPROCESSWORKAROUND : : XML ;
import generators ;
generators.register-standard common.copy : XML : XMLPROCESSWORKAROUND ;
generators.register-standard common.copy : XML : XMLPROCESSWORKAROUND ;

xmlprocessworkaround posix_pseudocode : v1/posix_pseudocode.xml ;
xmlprocessworkaround windows_pseudocode : v1/windows_pseudocode.xml ;

path-constant INCLUDES : ../../.. ;
path-constant INCLUDES : ../include ;

doxygen reference_v1
:
Expand Down Expand Up @@ -66,7 +66,7 @@ doxygen reference_v2
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 \\
BOOST_ASIO_DEFAULT_COMPLETION_TOKEN=DEFAULT \\
BOOST_ASIO_DEFAULT_COMPLETION_TOKEN=DEFAULT \\
BOOST_CONSTEXPR=constexpr \\
BOOST_CXX14_CONSTEXPR=constexpr \\
BOOST_PROCESS_V2_INLINE= \\
Expand Down Expand Up @@ -98,7 +98,7 @@ boostbook standalone
###############################################################################
alias boostdoc
: standalone/<format>docbook
:
:
: <dependency>images_glob
: ;
explicit boostdoc ;
Expand Down
2 changes: 1 addition & 1 deletion doc/process.qbk
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
]
]

[note Process v1 will be deprecated in the future. Use v2 for new projects.]
[note Process v1 will be deprecated in the next release (1.88). Use v2 for new projects.]

[include v1.qbk]
[include v2.qbk]
Expand Down
8 changes: 0 additions & 8 deletions doc/v2/introduction.qbk
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,6 @@ Instead of using ascii-APIs on windows, process V2 just assumes UTF-8 everywhere

[endsect]

[section:src Separate compilation]

Boost.process v2 supports separate compilation similar to other boost libraries.
It can be achieved by defining `BOOST_PROCESS_V2_SEPARATE_COMPILATION` and including
`<process/v2/src.hpp>` in a single compile unit.

[endsect]

[section:limit_fd Fd safe by default]

While not a problem on windows (since HANDLEs get manually enabled for inheritance),
Expand Down
2 changes: 1 addition & 1 deletion example/Jamfile.jam
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

project : requirements
<include>../../..
<library>/boost/process//boost_process
<toolset>msvc:<define>_SCL_SECURE_NO_WARNINGS
<target-os>windows:<define>WIN32_LEAN_AND_MEAN
;
Expand Down
8 changes: 3 additions & 5 deletions example/v2/Jamfile.jam
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,12 @@
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

project : requirements
<include>../../..
<toolset>msvc:<define>_SCL_SECURE_NO_WARNINGS
<target-os>windows:<define>WIN32_LEAN_AND_MEAN
<link>static
;

import testing ;

alias filesystem : /boost//filesystem : <link>static ;

exe intro : intro.cpp filesystem ;
exe intro_popen : intro_popen.cpp filesystem ;
exe intro : intro.cpp ;
exe intro_popen : intro_popen.cpp : <boost.process.fs>boost ;
11 changes: 10 additions & 1 deletion include/boost/process/v1/pipe.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,16 @@ struct basic_pipebuf : std::basic_streambuf<CharT, Traits>
{
if (!is_open())
return nullptr;
overflow(Traits::eof());
try {
overflow(Traits::eof());
_pipe.close();
return this;
}
catch(...)
{
_pipe.close();
throw ;
}
return this;
}
private:
Expand Down
24 changes: 12 additions & 12 deletions include/boost/process/v2/bind_launcher.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ struct bound_launcher
template<typename ExecutionContext, typename Args, typename ... Inits>
auto operator()(ExecutionContext & context,
const typename std::enable_if<std::is_convertible<
ExecutionContext&, BOOST_PROCESS_V2_ASIO_NAMESPACE::execution_context&>::value,
ExecutionContext&, net::execution_context&>::value,
filesystem::path >::type & executable,
Args && args,
Inits && ... inits) -> basic_process<typename ExecutionContext::executor_type>
Expand All @@ -88,7 +88,7 @@ struct bound_launcher
auto operator()(ExecutionContext & context,
error_code & ec,
const typename std::enable_if<std::is_convertible<
ExecutionContext&, BOOST_PROCESS_V2_ASIO_NAMESPACE::execution_context&>::value,
ExecutionContext&, net::execution_context&>::value,
filesystem::path >::type & executable,
Args && args,
Inits && ... inits ) -> basic_process<typename ExecutionContext::executor_type>
Expand All @@ -103,8 +103,8 @@ struct bound_launcher
template<typename Executor, typename Args, typename ... Inits>
auto operator()(Executor exec,
const typename std::enable_if<
BOOST_PROCESS_V2_ASIO_NAMESPACE::execution::is_executor<Executor>::value ||
BOOST_PROCESS_V2_ASIO_NAMESPACE::is_executor<Executor>::value,
net::execution::is_executor<Executor>::value ||
net::is_executor<Executor>::value,
filesystem::path >::type & executable,
Args && args,
Inits && ... inits ) -> basic_process<Executor>
Expand All @@ -120,8 +120,8 @@ struct bound_launcher
auto operator()(Executor exec,
error_code & ec,
const typename std::enable_if<
BOOST_PROCESS_V2_ASIO_NAMESPACE::execution::is_executor<Executor>::value ||
BOOST_PROCESS_V2_ASIO_NAMESPACE::is_executor<Executor>::value,
net::execution::is_executor<Executor>::value ||
net::is_executor<Executor>::value,
filesystem::path >::type & executable,
Args && args,
Inits && ... inits ) -> basic_process<Executor>
Expand All @@ -138,7 +138,7 @@ struct bound_launcher
auto invoke(detail::index_sequence<Idx...>,
ExecutionContext & context,
const typename std::enable_if<std::is_convertible<
ExecutionContext&, BOOST_PROCESS_V2_ASIO_NAMESPACE::execution_context&>::value,
ExecutionContext&, net::execution_context&>::value,
filesystem::path >::type & executable,
Args && args,
Inits && ... inits) -> basic_process<typename ExecutionContext::executor_type>
Expand All @@ -156,7 +156,7 @@ struct bound_launcher
ExecutionContext & context,
error_code & ec,
const typename std::enable_if<std::is_convertible<
ExecutionContext&, BOOST_PROCESS_V2_ASIO_NAMESPACE::execution_context&>::value,
ExecutionContext&, net::execution_context&>::value,
filesystem::path >::type & executable,
Args && args,
Inits && ... inits ) -> basic_process<typename ExecutionContext::executor_type>
Expand All @@ -172,8 +172,8 @@ struct bound_launcher
auto invoke(detail::index_sequence<Idx...>,
Executor exec,
const typename std::enable_if<
BOOST_PROCESS_V2_ASIO_NAMESPACE::execution::is_executor<Executor>::value ||
BOOST_PROCESS_V2_ASIO_NAMESPACE::is_executor<Executor>::value,
net::execution::is_executor<Executor>::value ||
net::is_executor<Executor>::value,
filesystem::path >::type & executable,
Args && args,
Inits && ... inits ) -> basic_process<Executor>
Expand All @@ -190,8 +190,8 @@ struct bound_launcher
Executor exec,
error_code & ec,
const typename std::enable_if<
BOOST_PROCESS_V2_ASIO_NAMESPACE::execution::is_executor<Executor>::value ||
BOOST_PROCESS_V2_ASIO_NAMESPACE::is_executor<Executor>::value,
net::execution::is_executor<Executor>::value ||
net::is_executor<Executor>::value,
filesystem::path >::type & executable,
Args && args,
Inits && ... inits ) -> basic_process<Executor>
Expand Down
Loading
Loading