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 9, 2024
1 parent 58586e4 commit 5506b8e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 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
15 changes: 10 additions & 5 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 All @@ -343,10 +347,11 @@ struct basic_process_handle_fd_or_signal

if (!ec && (wait_res == 0))
{
static char dummy[128];
needs_post = false;
if (descriptor.is_open())
descriptor.async_wait(
net::posix::descriptor_base::wait_read,
descriptor.async_read_some(
asio::buffer(dummy),
std::move(self));
else
handle.async_wait(std::move(self));
Expand Down Expand Up @@ -379,10 +384,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 5506b8e

Please sign in to comment.