Skip to content

Commit

Permalink
Reenabled pdfork.
Browse files Browse the repository at this point in the history
  • Loading branch information
klemens-morgenstern committed Nov 8, 2024
1 parent 58586e4 commit eed434b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .drone.star
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ windowsglobalimage="cppalliance/dronevs2019"

def main(ctx):
return [
freebsd_cxx("gcc 11 freebsd", "g++-11", buildtype="boost", buildscript="drone", freebsd_version="13.1", environment={'B2_TOOLSET': 'gcc-11', 'B2_CXXSTD': '17,20', 'B2_LINKFLAGS': '-Wl,-rpath=/usr/local/lib/gcc11'}, globalenv=globalenv),
freebsd_cxx("clang 14 freebsd", "clang++-14", buildtype="boost", buildscript="drone", freebsd_version="13.1", environment={'B2_TOOLSET': 'clang-14', 'B2_CXXSTD': '17,20'}, globalenv=globalenv),
freebsd_cxx("gcc freebsd", "g++", buildtype="boost", buildscript="drone", freebsd_version="13.1", environment={'B2_TOOLSET': 'gcc', 'B2_CXXSTD': '11'}, globalenv=globalenv),
freebsd_cxx("clang 14 freebsd", "clang++-14", buildtype="boost", buildscript="drone", freebsd_version="13.1", environment={'B2_TOOLSET': 'clang-14', 'B2_CXXSTD': '11'}, globalenv=globalenv),
linux_cxx("docs", "", packages="docbook docbook-xml docbook-xsl xsltproc libsaxonhe-java default-jre-headless flex libfl-dev bison unzip rsync", image="cppalliance/droneubuntu1804:1", buildtype="docs", buildscript="drone", environment={"COMMENT": "docs"}, globalenv=globalenv),
linux_cxx("asan", "g++-8", packages="g++-8", buildtype="boost", buildscript="drone", image=linuxglobalimage, environment={'COMMENT': 'asan', 'B2_VARIANT': 'debug', 'B2_TOOLSET': 'gcc-8', 'B2_CXXSTD': '11', 'B2_ASAN': '1', 'B2_DEFINES': 'BOOST_NO_STRESS_TEST=1', 'DRONE_EXTRA_PRIVILEGED': 'True', 'DRONE_JOB_UUID': '356a192b79'}, globalenv=globalenv, privileged=True),
linux_cxx("ubsan", "g++-8", packages="g++-8", buildtype="boost", buildscript="drone", image=linuxglobalimage, environment={'COMMENT': 'ubsan', 'B2_VARIANT': 'debug', 'B2_TOOLSET': 'gcc-8', 'B2_CXXSTD': '11', 'B2_UBSAN': '1', 'B2_DEFINES': 'BOOST_NO_STRESS_TEST=1', 'B2_LINKFLAGS': '-fuse-ld=gold', 'DRONE_JOB_UUID': '77de68daec'}, globalenv=globalenv),
Expand Down
2 changes: 1 addition & 1 deletion include/boost/process/v2/detail/config.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ BOOST_PROCESS_V2_END_NAMESPACE
#endif
#endif

#if defined(__FreeBSD__) && defined(BOOST_PROCESS_V2_ENABLE_PDFORK)
#if defined(__FreeBSD__) && !defined(BOOST_PROCESS_V2_DISABLE_PDFORK)
#define BOOST_PROCESS_V2_PDFORK 1
#define BOOST_PROCESS_V2_HAS_PROCESS_HANDLE 1
#endif
Expand Down
12 changes: 8 additions & 4 deletions include/boost/process/v2/detail/process_handle_fd_or_signal.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -315,9 +315,13 @@ struct basic_process_handle_fd_or_signal

struct async_wait_op_
{
net::posix::basic_descriptor<Executor> &descriptor;
net::posix::basic_stream_descriptor<Executor> &descriptor;
net::basic_signal_set<Executor> &handle;
pid_type pid_;
async_wait_op_(net::posix::basic_stream_descriptor<Executor> &descriptor,
net::basic_signal_set<Executor> &handle,
pid_type pid_) : descriptor(descriptor), handle(handle), pid_(pid_) {}

bool needs_post = true;

template<typename Self>
Expand Down Expand Up @@ -346,7 +350,7 @@ struct basic_process_handle_fd_or_signal
needs_post = false;
if (descriptor.is_open())
descriptor.async_wait(
net::posix::descriptor_base::wait_read,
net::posix::descriptor_base::wait_error,
std::move(self));
else
handle.async_wait(std::move(self));
Expand Down Expand Up @@ -379,10 +383,10 @@ struct basic_process_handle_fd_or_signal
WaitHandler = net::default_completion_token_t<executor_type>>
auto async_wait(WaitHandler &&handler = net::default_completion_token_t<executor_type>())
-> decltype(net::async_compose<WaitHandler, void(error_code, native_exit_code_type)>(
async_wait_op_{descriptor_, signal_set_, pid_}, handler, descriptor_))
async_wait_op_(descriptor_, signal_set_, pid_), handler, descriptor_))
{
return net::async_compose<WaitHandler, void(error_code, native_exit_code_type)>(
async_wait_op_{descriptor_, signal_set_, pid_}, handler, descriptor_);
async_wait_op_(descriptor_, signal_set_, pid_), handler, descriptor_);
}
};
}
Expand Down

0 comments on commit eed434b

Please sign in to comment.