diff --git a/doc/v1/design.qbk b/doc/v1/design.qbk
index 2611c29dd..0dd49f16e 100644
--- a/doc/v1/design.qbk
+++ b/doc/v1/design.qbk
@@ -75,9 +75,9 @@ but the one of the launching process, not the one passed to the child process.]
The simplest form to extend functionality is to provide another handler, which
will be called on the respective events on process launching. The names are:
-*`boost::process::on_setup`
-*`boost::process::on_error`
-*`boost::process::on_success`
+*`boost::process::v1::on_setup`
+*`boost::process::v1::on_error`
+*`boost::process::v1::on_success`
As an example:
diff --git a/doc/v1/extend.qbk b/doc/v1/extend.qbk
index fad4db545..dfe4f8517 100644
--- a/doc/v1/extend.qbk
+++ b/doc/v1/extend.qbk
@@ -1,14 +1,14 @@
-[def __on_exit__ [globalref boost::process::on_exit on_exit]]
-[def __on_success__ [globalref boost::process::extend::on_success ex::on_success]]
-[def __child__ [classref boost::process::child child]]
-[def __handler__ [classref boost::process::extend::handler handler]]
-[def __on_success__ [memberref boost::process::extend::handler::on_success on_success]]
-[def __posix_executor__ [classref boost::process::extend::posix_executor ex::posix_executor]]
-[def __windows_executor__ [classref boost::process::extend::windows_executor ex::windows_executor]]
+[def __on_exit__ [globalref boost::process::v1::on_exit on_exit]]
+[def __on_success__ [globalref boost::process::v1::extend::on_success ex::on_success]]
+[def __child__ [classref boost::process::v1::child child]]
+[def __handler__ [classref boost::process::v1::extend::handler handler]]
+[def __on_success__ [memberref boost::process::v1::extend::handler::on_success on_success]]
+[def __posix_executor__ [classref boost::process::v1::extend::posix_executor ex::posix_executor]]
+[def __windows_executor__ [classref boost::process::v1::extend::windows_executor ex::windows_executor]]
[def __io_context__ [@http://www.boost.org/doc/libs/release/doc/html/boost_asio/reference/io_context.html boost::asio::io_context]]
-[def __require_io_context__ [classref boost::process::extend::require_io_context ex::require_io_context]]
-[def __async_handler__ [classref boost::process::extend::async_handler ex::async_handler]]
-[def __get_io_context__ [funcref boost::process::extend::get_io_context ex::get_io_context]]
+[def __require_io_context__ [classref boost::process::v1::extend::require_io_context ex::require_io_context]]
+[def __async_handler__ [classref boost::process::v1::extend::async_handler ex::async_handler]]
+[def __get_io_context__ [funcref boost::process::v1::extend::get_io_context ex::get_io_context]]
[section:extend Extensions]
To extend the library, the header [headerref boost/process/extend.hpp extend] is provided.
@@ -16,7 +16,7 @@ To extend the library, the header [headerref boost/process/extend.hpp extend] is
It only provides the explicit style for custom properties, but no implicit style.
What this means is, that a custom initializer can be implemented, a reference which can be passed to one of the launching functions.
-If a class inherits [classref boost::process::extend::handler] it will be regarded as an initializer and thus directly put into the sequence
+If a class inherits [classref boost::process::v1::extend::handler] it will be regarded as an initializer and thus directly put into the sequence
the executor gets passed.
[section:structure Structure]
@@ -24,9 +24,9 @@ the executor gets passed.
The executor calls different handlers of the initializers during the process launch.
The basic structure consists of three functions, as given below:
-* [globalref boost::process::extend::on_setup on_setup]
-* [globalref boost::process::extend::on_error on_error]
-* [globalref boost::process::extend::on_success on_success]
+* [globalref boost::process::v1::extend::on_setup on_setup]
+* [globalref boost::process::v1::extend::on_error on_error]
+* [globalref boost::process::v1::extend::on_success on_success]
'''
@@ -34,11 +34,11 @@ The basic structure consists of three functions, as given below:
Additionally posix provides three more handlers, listed below:
-* [globalref boost::process::extend::on_fork_error on_fork_error]
-* [globalref boost::process::extend::on_exec_setup on_exec_setup]
-* [globalref boost::process::extend::on_exec_error on_exec_error]
+* [globalref boost::process::v1::extend::on_fork_error on_fork_error]
+* [globalref boost::process::v1::extend::on_exec_setup on_exec_setup]
+* [globalref boost::process::v1::extend::on_exec_error on_exec_error]
-For more information see the reference of [classref boost::process::extend::posix_executor posix_executor].
+For more information see the reference of [classref boost::process::v1::extend::posix_executor posix_executor].
[endsect]
[section:simple Simple extensions]
@@ -55,8 +55,8 @@ __child__ c("foo", __on_success__=[](auto & exec) {std::cout << "hello world" <<
Considering that lambdas can also capture values, data can easily be shared between handlers.
-To see which members the executor has, refer to [classref boost::process::extend::windows_executor windows_executor]
-and [classref boost::process::extend::posix_executor posix_executor].
+To see which members the executor has, refer to [classref boost::process::v1::extend::windows_executor windows_executor]
+and [classref boost::process::v1::extend::posix_executor posix_executor].
[note Combined with __on_exit__ this can also handle the process exit.]
@@ -67,7 +67,7 @@ and [classref boost::process::extend::posix_executor posix_executor].
[section:handler Handler Types]
Since the previous example is in a functional style, it is not very reusable.
-To solve that problem, the [classref boost::process::extend::handler handler] has an alias in the `boost::process::extend` namespace, to be inherited.
+To solve that problem, the [classref boost::process::v1::extend::handler handler] has an alias in the `boost::process::v1::extend` namespace, to be inherited.
So let's implement the hello world example in a class.
```
@@ -86,7 +86,7 @@ __child__ c("foo", hello_world());
[note The implementation is done via overloading, not overriding.]
-Every handler not implemented defaults to [classref boost::process::extend::handler handler], where an empty handler is defined for each event.
+Every handler not implemented defaults to [classref boost::process::v1::extend::handler handler], where an empty handler is defined for each event.
[endsect]
@@ -108,11 +108,11 @@ struct async_foo : __handler__, __require_io_context__
}
};
```
-[note Inheriting [globalref boost::process::extend::require_io_context require_io_context] is necessary, so [funcref boost::process::system system] provides one.]
+[note Inheriting [globalref boost::process::v1::extend::require_io_context require_io_context] is necessary, so [funcref boost::process::v1::system system] provides one.]
Additionally the handler can provide a function that is invoked when the child process exits. This is done through __async_handler__.
-[note [globalref boost::process::extend::async_handler async_handler] implies [globalref boost::process::extend::require_io_context require_io_context] .]
+[note [globalref boost::process::v1::extend::async_handler async_handler] implies [globalref boost::process::v1::extend::require_io_context require_io_context] .]
```
struct async_bar : __handler, __async_handler__
@@ -131,7 +131,7 @@ struct async_bar : __handler, __async_handler__
```
-[caution `on_exit_handler` does not default and is always required when [classref boost::process::extend::async_handler async_handler] is inherited. ]
+[caution `on_exit_handler` does not default and is always required when [classref boost::process::v1::extend::async_handler async_handler] is inherited. ]
[caution `on_exit_handler` uses `boost::asio::signal_set` to listen for SIGCHLD on posix. The application must not also register a signal handler for SIGCHLD using functions such as `signal()` or `sigaction()` (but using `boost::asio::signal_set` is fine). ]
@@ -156,7 +156,7 @@ auto set_error = [](auto & exec)
__child__ c("foo", on_setup=set_error);
```
-Since we do not specify the error-handling mode in this example, this will throw [classref boost::process::process_error process_error].
+Since we do not specify the error-handling mode in this example, this will throw [classref boost::process::v1::process_error process_error].
[endsect]
diff --git a/doc/v1/introduction.qbk b/doc/v1/introduction.qbk
index fa98c1330..e9fe67f2d 100644
--- a/doc/v1/introduction.qbk
+++ b/doc/v1/introduction.qbk
@@ -10,10 +10,10 @@ Boost.Process is a library to manage system processes. It can be used to:
Here's a simple example of how to start a program with Boost.Process:
-[def ipstream [classref boost::process::ipstream ipstream]]
-[def system [funcref boost::process::system system]]
-[def std_out [globalref boost::process::std_out std_out]]
-[def child [globalref boost::process::child child]]
+[def ipstream [classref boost::process::v1::ipstream ipstream]]
+[def system [funcref boost::process::v1::system system]]
+[def std_out [globalref boost::process::v1::std_out std_out]]
+[def child [globalref boost::process::v1::child child]]
[def boost/process.hpp [headerref boost/process.hpp boost/process.hpp]]
[def std::string [@http://en.cppreference.com/w/cpp/string/basic_string std::string]]
[def std::getline [@http://en.cppreference.com/w/cpp/string/basic_string/getline std::getline]]
diff --git a/doc/v1/posix_pseudocode.xml b/doc/v1/posix_pseudocode.xml
index 5ba3d8536..699d087e5 100644
--- a/doc/v1/posix_pseudocode.xml
+++ b/doc/v1/posix_pseudocode.xml
@@ -1,59 +1,59 @@
for (auto & s : seq)
- s.on_setup(*this);
+ s.on_setup(*this);
-if (error())
+if (error())
{
for (auto & s : seq)
- s.on_error(*this, error());
- return child();
+ s.on_error(*this, error());
+ return child();
}
pid = fork()
-on_setup(*this);
+on_setup(*this);
if (pid == -1) //fork error
{
- set_error(get_last_error());
+ set_error(get_last_error());
for (auto & s : seq)
- s.on_fork_error(*this, error());
+ s.on_fork_error(*this, error());
for (auto & s : seq)
- s.on_error(*this, error());
- return child()
+ s.on_error(*this, error());
+ return child()
}
else if (pid == 0) //child process
{
for (auto & s : seq)
- s.on_exec_setup(*this);
+ s.on_exec_setup(*this);
execve(exe, cmd_line, env);
- auto ec = get_last_error();
+ auto ec = get_last_error();
for (auto & s : seq)
- s.on_exec_error(*this);
+ s.on_exec_error(*this);
unspecified();//here the error is sent to the father process internally
std::exit(EXIT_FAILURE);
- return child(); //for C++ compliance
+ return child(); //for C++ compliance
}
-child c(pid, exit_code);
+child c(pid, exit_code);
unspecified();//here, we read the error from the child process
-if (error())
+if (error())
for (auto & s : seq)
- s.on_error(*this, error());
+ s.on_error(*this, error());
else
for (auto & s : seq)
- s.on_success(*this);
+ s.on_success(*this);
//now we check again, because an on_success handler might've errored.
-if (error())
+if (error())
{
for (auto & s : seq)
- s.on_error(*this, error());
- return child();
+ s.on_error(*this, error());
+ return child();
}
else
return c;
diff --git a/doc/v1/tutorial.qbk b/doc/v1/tutorial.qbk
index 4b208b466..e7e98a2b0 100644
--- a/doc/v1/tutorial.qbk
+++ b/doc/v1/tutorial.qbk
@@ -1,49 +1,49 @@
-[def bp::system [funcref boost::process::system bp::system]]
-[def bp::async_system [funcref boost::process::async_system bp::async_system]]
-[def bp::spawn [funcref boost::process::spawn bp::spawn]]
-[def bp::child [classref boost::process::child bp::child]]
-[def bp::cmd [classref boost::process::cmd bp::cmd]]
-[def bp::group [classref boost::process::group bp::group]]
-[def bp::ipstream [classref boost::process::ipstream bp::ipstream]]
-[def bp::opstream [classref boost::process::opstream bp::opstream]]
-[def bp::pstream [classref boost::process::pstream bp::pstream]]
-[def bp::pipe [classref boost::process::pipe bp::pipe]]
-[def bp::async_pipe [classref boost::process::async_pipe bp::async_pipe]]
-[def bp::search_path [funcref boost::process::search_path bp::search_path]]
+[def bp::system [funcref boost::process::v1::system bp::system]]
+[def bp::async_system [funcref boost::process::v1::async_system bp::async_system]]
+[def bp::spawn [funcref boost::process::v1::spawn bp::spawn]]
+[def bp::child [classref boost::process::v1::child bp::child]]
+[def bp::cmd [classref boost::process::v1::cmd bp::cmd]]
+[def bp::group [classref boost::process::v1::group bp::group]]
+[def bp::ipstream [classref boost::process::v1::ipstream bp::ipstream]]
+[def bp::opstream [classref boost::process::v1::opstream bp::opstream]]
+[def bp::pstream [classref boost::process::v1::pstream bp::pstream]]
+[def bp::pipe [classref boost::process::v1::pipe bp::pipe]]
+[def bp::async_pipe [classref boost::process::v1::async_pipe bp::async_pipe]]
+[def bp::search_path [funcref boost::process::v1::search_path bp::search_path]]
[def boost_org [@www.boost.org "www.boost.org"]]
[def std::system [@http://en.cppreference.com/w/cpp/utility/program/system std::system]]
-[def child_running [memberref boost::process::child::running running]]
-[def child_wait [memberref boost::process::child::wait wait]]
-[def child_wait_for [memberref boost::process::child::wait_for wait_for]]
-[def child_exit_code [memberref boost::process::child::exit_code exit_code]]
-[def group_wait_for [memberref boost::process::group::wait_for wait_for]]
-[def bp::on_exit [globalref boost::process::on_exit bp::on_exit]]
-[def bp::null [globalref boost::process::null bp::null]]
-[def child_terminate [memberref boost::process::child::terminate terminate]]
-[def group_terminate [memberref boost::process::group::terminate terminate]]
-[def group_wait [memberref boost::process::group::wait wait]]
-[def bp::std_in [globalref boost::process::std_in bp::std_in]]
-[def bp::std_out [globalref boost::process::std_out bp::std_out]]
-[def bp::std_err [globalref boost::process::std_err bp::std_err]]
+[def child_running [memberref boost::process::v1::child::running running]]
+[def child_wait [memberref boost::process::v1::child::wait wait]]
+[def child_wait_for [memberref boost::process::v1::child::wait_for wait_for]]
+[def child_exit_code [memberref boost::process::v1::child::exit_code exit_code]]
+[def group_wait_for [memberref boost::process::v1::group::wait_for wait_for]]
+[def bp::on_exit [globalref boost::process::v1::on_exit bp::on_exit]]
+[def bp::null [globalref boost::process::v1::null bp::null]]
+[def child_terminate [memberref boost::process::v1::child::terminate terminate]]
+[def group_terminate [memberref boost::process::v1::group::terminate terminate]]
+[def group_wait [memberref boost::process::v1::group::wait wait]]
+[def bp::std_in [globalref boost::process::v1::std_in bp::std_in]]
+[def bp::std_out [globalref boost::process::v1::std_out bp::std_out]]
+[def bp::std_err [globalref boost::process::v1::std_err bp::std_err]]
[def io_service [@http://www.boost.org/doc/libs/release/doc/html/boost_asio/reference/io_service.html boost::asio::io_service]]
[def asio_buffer [@http://www.boost.org/doc/libs/release/doc/html/boost_asio/reference/buffer.html boost::asio::buffer]]
[def asio_async_read [@http://www.boost.org/doc/libs/release/doc/html/boost_asio/reference/async_read.html boost::asio::async_read]]
-[def bp::environment [classref boost::process::basic_environment bp::environment]]
-[def bp::native_environment [classref boost::process::basic_native_environment bp::native_environment]]
+[def bp::environment [classref boost::process::v1::basic_environment bp::environment]]
+[def bp::native_environment [classref boost::process::v1::basic_native_environment bp::native_environment]]
[def boost::this_process::environment [funcref boost::this_process::environment boost::this_process::environment]]
[def std::chrono::seconds [@http://en.cppreference.com/w/cpp/chrono/duration std::chrono::seconds]]
[def std::vector [@http://en.cppreference.com/w/cpp/container/vector std::vector]]
-[def __wait_for__ [memberref boost::process::child::wait_for wait_for]]
-[def __wait_until__ [memberref boost::process::child::wait_until wait_until]]
-[def __detach__ [memberref boost::process::child::detach detach]]
+[def __wait_for__ [memberref boost::process::v1::child::wait_for wait_for]]
+[def __wait_until__ [memberref boost::process::v1::child::wait_until wait_until]]
+[def __detach__ [memberref boost::process::v1::child::detach detach]]
[def __reference__ [link process.reference reference]]
[def __concepts__ [link boost_process.concepts concepts]]
[def boost::asio::yield_context [@http://www.boost.org/doc/libs/release/doc/html/boost_asio/reference/yield_context.html boost::asio::yield_context]]
[def boost::asio::coroutine [@http://www.boost.org/doc/libs/release/doc/html/boost_asio/reference/coroutine.html boost::asio::coroutine]]
-[def bp::env [globalref boost::process::env bp::env]]
+[def bp::env [globalref boost::process::v1::env bp::env]]
[section:tutorial Tutorial]
@@ -82,10 +82,10 @@ int result = bp::system("/usr/bin/g++", "main.cpp");
```
With that syntax we still have "g++" hard-coded, so let's assume we get the string
-from an external source as `boost::process::filesystem::path`, we can do this too.
+from an external source as `boost::process::v1::filesystem::path`, we can do this too.
```
-boost::process::filesystem::path p = "/usr/bin/g++"; //or get it from somewhere else.
+boost::process::v1::filesystem::path p = "/usr/bin/g++"; //or get it from somewhere else.
int result = bp::system(p, "main.cpp");
```
@@ -93,28 +93,28 @@ Now we might want to find the `g++` executable in the `PATH`-variable, as the `c
`Boost.process` provides a function to this end: bp::search_path.
```
-boost::process::filesystem::path p = bp::search_path("g++"); //or get it from somewhere else.
+boost::process::v1::filesystem::path p = bp::search_path("g++"); //or get it from somewhere else.
int result = bp::system(p, "main.cpp");
```
-[note [funcref boost::process::search_path search_path] will search for any executable with that name.
+[note [funcref boost::process::v1::search_path search_path] will search for any executable with that name.
This also includes to add a file suffix on windows, such as `.exe` or `.bat`.]
[endsect]
[section:launch_mode Launch functions]
-Given that our example used the [funcref boost::process::system system] function,
+Given that our example used the [funcref boost::process::v1::system system] function,
our program will wait until the child process is completed. This may be unwanted,
especially since compiling can take a while.
In order to avoid that, boost.process provides several ways to launch a process.
-Besides the already mentioned [funcref boost::process::system system] function and its
-asynchronous version [funcref boost::process::async_system async_system],
-we can also use the [funcref boost::process::spawn spawn] function or the
-[classref boost::process::child child] class.
+Besides the already mentioned [funcref boost::process::v1::system system] function and its
+asynchronous version [funcref boost::process::v1::async_system async_system],
+we can also use the [funcref boost::process::v1::spawn spawn] function or the
+[classref boost::process::v1::child child] class.
-The [funcref boost::process::spawn spawn] function launches a process and
+The [funcref boost::process::v1::spawn spawn] function launches a process and
immediately detaches it, so no handle will be returned and the process will be ignored.
This is not what we need for compiling, but maybe we want to entertain the user,
while compiling:
@@ -124,7 +124,7 @@ bp::spawn(bp::search_path("chrome"), boost_org);
```
Now for the more sensible approach for compiling: a non-blocking execution.
-To implement that, we directly call the constructor of [classref boost::process::child child].
+To implement that, we directly call the constructor of [classref boost::process::v1::child child].
```
bp::child c(bp::search_path("g++"), "main.cpp");
@@ -189,9 +189,9 @@ Now, let's take a more visual example for reading data.
which reads the outline, i.e. a list of all entry points, of a binary.
Every entry point will be put into a single line, and we will use a pipe to read it.
At the end an empty line is appended, which we use as the indication to stop reading.
-Boost.process provides the pipestream ([classref boost::process::ipstream ipstream],
-[classref boost::process::opstream opstream], [classref boost::process::pstream pstream]) to
-wrap around the [classref boost::process::pipe pipe] and provide an implementation of the
+Boost.process provides the pipestream ([classref boost::process::v1::ipstream ipstream],
+[classref boost::process::v1::opstream opstream], [classref boost::process::v1::pstream pstream]) to
+wrap around the [classref boost::process::v1::pipe pipe] and provide an implementation of the
[@http://en.cppreference.com/w/cpp/io/basic_istream std::istream],
[@http://en.cppreference.com/w/cpp/io/basic_ostream std::ostream] and
[@http://en.cppreference.com/w/cpp/io/basic_iostream std::iostream] interface.
@@ -217,7 +217,7 @@ std::vector read_outline(std::string & file)
What this does is redirect the `stdout` of the process into a pipe and we read this
synchronously.
-[note You can do the same thing with [globalref boost::process::std_err std_err].]
+[note You can do the same thing with [globalref boost::process::v1::std_err std_err].]
Now we get the name from `nm` and we might want to demangle it, so we use input and output.
`nm` has a demangle option, but for the sake of the example, we'll use
@@ -267,8 +267,8 @@ This forwards the data from `nm` to `c++filt` without your process needing to do
Boost.process allows the usage of boost.asio to implement asynchronous I/O.
If you are familiar with [@http://www.boost.org/doc/libs/release/libs/asio/ boost.asio] (which we highly recommend),
-you can use [classref boost::process::async_pipe async_pipe] which is implemented
-as an I/O-Object and can be used like [classref boost::process::pipe pipe] as shown above.
+you can use [classref boost::process::v1::async_pipe async_pipe] which is implemented
+as an I/O-Object and can be used like [classref boost::process::v1::pipe pipe] as shown above.
Now we get back to our compiling example. For `nm` we might analyze the output line by line,
but the compiler output will just be put into one large buffer.
@@ -304,7 +304,7 @@ int result = c.exit_code();
```
[note Passing an instance of io_service to the launching function automatically cause it to wait asynchronously for the exit, so no call of
-[memberref boost::process::child::wait wait] is needed.]
+[memberref boost::process::v1::child::wait wait] is needed.]
To make it even easier, you can use [@http://en.cppreference.com/w/cpp/thread/future std::future] for asynchronous operations
(you will still need to pass a reference to a io_service) to the launching function, unless you use bp::system or bp::async_system.
@@ -364,7 +364,7 @@ c.child_wait(); //to avoid a zombie process & get the exit code
```
Now given the example, we still call child_wait to avoid a zombie process.
-An easier solution for that might be to use [funcref boost::process::spawn spawn].
+An easier solution for that might be to use [funcref boost::process::v1::spawn spawn].
To put two processes into one group, the following code suffices. Spawn already
@@ -412,7 +412,7 @@ bp::system("stuff", env_);
```
A more convenient way to modify the environment for the child is the
-[globalref boost::process::env env] property, which can be used in the example as following:
+[globalref boost::process::v1::env env] property, which can be used in the example as following:
```
bp::system("stuff", bp::env["VALUE_1"]="foo", bp::env["VALUE_2"]+={"bar1", "bar2"});
diff --git a/doc/v1/windows_pseudocode.xml b/doc/v1/windows_pseudocode.xml
index fdcb780c8..8cca87bd2 100644
--- a/doc/v1/windows_pseudocode.xml
+++ b/doc/v1/windows_pseudocode.xml
@@ -1,13 +1,13 @@
for (auto & s : seq)
- s.on_setup(*this);
+ s.on_setup(*this);
-if (error())
+if (error())
{
for (auto & s : seq)
- s.on_error(*this, error());
- return child();
+ s.on_error(*this, error());
+ return child();
}
int err_code = CreateProcess(
exe,
@@ -20,21 +20,21 @@ int err_code = child c(proc_info, exit_code);
+child c(proc_info, exit_code);
-if (error())
+if (error())
for (auto & s : seq)
- s.on_error(*this, error());
+ s.on_error(*this, error());
else
for (auto & s : seq)
- s.on_success(*this);
+ s.on_success(*this);
//now we check again, because an on_success handler might've errored.
-if (error())
+if (error())
{
for (auto & s : seq)
- s.on_error(*this, error());
- return child();
+ s.on_error(*this, error());
+ return child();
}
else
return c;
diff --git a/example/io.cpp b/example/io.cpp
index 97ace20ad..7b5142da8 100644
--- a/example/io.cpp
+++ b/example/io.cpp
@@ -22,7 +22,7 @@ int main()
bp::std_in < bp::null //null in
);
- boost::process::filesystem::path p = "input.txt";
+ boost::process::v1::filesystem::path p = "input.txt";
bp::system(
"test.exe",
diff --git a/example/start_dir.cpp b/example/start_dir.cpp
index b4061fd78..fa7ae7649 100644
--- a/example/start_dir.cpp
+++ b/example/start_dir.cpp
@@ -19,9 +19,9 @@ int main()
bp::start_dir="../foo"
);
- boost::process::filesystem::path exe = "test.exe";
+ boost::process::v1::filesystem::path exe = "test.exe";
bp::system(
- boost::process::filesystem::absolute(exe),
+ boost::process::v1::filesystem::absolute(exe),
bp::start_dir="../foo"
);
}
diff --git a/include/boost/process/v1/args.hpp b/include/boost/process/v1/args.hpp
index dd85d2f5b..b06ca624c 100644
--- a/include/boost/process/v1/args.hpp
+++ b/include/boost/process/v1/args.hpp
@@ -13,16 +13,16 @@
/** \file boost/process/args.hpp
*
- * This header provides the \xmlonly args\endxmlonly property. It also provides the
- * alternative name \xmlonly argv\endxmlonly .
+ * This header provides the \xmlonly args\endxmlonly property. It also provides the
+ * alternative name \xmlonly argv\endxmlonly .
*
*
\xmlonly
namespace boost {
- namespace process {
- unspecified args;
- unspecified argv;
+ namespace process { BOOST_PROCESS_V1_INLINE namespace v1 {
+ unspecified args;
+ unspecified argv;
}
}
@@ -33,7 +33,7 @@ namespace boost {
#include
#include
-namespace boost { namespace process { namespace detail {
+namespace boost { namespace process { BOOST_PROCESS_V1_INLINE namespace v1 { namespace detail {
struct args_
{
@@ -268,12 +268,12 @@ spawn("gcc", args+={"--version"});
*/
-constexpr boost::process::detail::args_ args{};
+constexpr boost::process::v1::detail::args_ args{};
-///Alias for \xmlonly args \endxmlonly .
-constexpr boost::process::detail::args_ argv{};
+///Alias for \xmlonly args \endxmlonly .
+constexpr boost::process::v1::detail::args_ argv{};
-}}
+}}}
#endif
diff --git a/include/boost/process/v1/async.hpp b/include/boost/process/v1/async.hpp
index 4ae5e7585..d701d921f 100644
--- a/include/boost/process/v1/async.hpp
+++ b/include/boost/process/v1/async.hpp
@@ -17,8 +17,10 @@ into the boost::process namespace for convenience.
namespace boost {
namespace process {
- unspecified buffer;
- unspecified on_exit;
+ namespace v1 {
+ unspecified buffer;
+ unspecified on_exit;
+ }
}
}
@@ -51,7 +53,7 @@ namespace boost {
#include
#endif
-namespace boost { namespace process { namespace detail {
+namespace boost { namespace process { BOOST_PROCESS_V1_INLINE namespace v1 { namespace detail {
struct async_tag;
@@ -122,10 +124,10 @@ chlid c2("ls", ios, on_exit=exit_code);
same restrictions as that class (do not register a handler for `SIGCHLD` except by using
`boost::asio::signal_set`).
*/
-constexpr static ::boost::process::detail::on_exit_ on_exit{};
+constexpr static ::boost::process::v1::detail::on_exit_ on_exit{};
#endif
-}}
+}}}
diff --git a/include/boost/process/v1/async_pipe.hpp b/include/boost/process/v1/async_pipe.hpp
index 97abcc31d..642c18943 100644
--- a/include/boost/process/v1/async_pipe.hpp
+++ b/include/boost/process/v1/async_pipe.hpp
@@ -20,7 +20,7 @@
#include
#endif
-namespace boost { namespace process {
+namespace boost { namespace process { BOOST_PROCESS_V1_INLINE namespace v1 {
#if defined(BOOST_PROCESS_DOXYGEN)
@@ -206,11 +206,11 @@ class async_pipe
};
#else
-using ::boost::process::detail::api::async_pipe;
+using ::boost::process::v1::detail::api::async_pipe;
#endif
-}}
+}}}
diff --git a/include/boost/process/v1/async_system.hpp b/include/boost/process/v1/async_system.hpp
index eace9c897..830a19b82 100644
--- a/include/boost/process/v1/async_system.hpp
+++ b/include/boost/process/v1/async_system.hpp
@@ -34,12 +34,12 @@
#endif
namespace boost {
-namespace process {
+namespace process { BOOST_PROCESS_V1_INLINE namespace v1 {
namespace detail
{
template
-struct async_system_handler : ::boost::process::detail::api::async_handler
+struct async_system_handler : ::boost::process::v1::detail::api::async_handler
{
boost::asio::io_context & ios;
Handler handler;
@@ -108,7 +108,7 @@ the return value (from the second parameter, `exit_handler`).
*/
#if defined(BOOST_PROCESS_DOXYGEN)
template
-inline boost::process::detail::dummy
+inline boost::process::v1::detail::dummy
async_system(boost::asio::io_context & ios, ExitHandler && exit_handler, Args && ...args);
#endif
@@ -134,7 +134,7 @@ inline BOOST_ASIO_INITFN_RESULT_TYPE(ExitHandler, void (boost::system::error_cod
async_system(boost::asio::io_context & ios, ExitHandler && exit_handler, Args && ...args)
{
- typedef typename ::boost::process::detail::has_error_handler>::type
+ typedef typename ::boost::process::v1::detail::has_error_handler>::type
has_err_handling;
static_assert(!has_err_handling::value, "async_system cannot have custom error handling");
@@ -146,6 +146,6 @@ inline BOOST_ASIO_INITFN_RESULT_TYPE(ExitHandler, void (boost::system::error_cod
-}}
-#endif
+}}}
+#endif
diff --git a/include/boost/process/v1/child.hpp b/include/boost/process/v1/child.hpp
index ad3f361e5..ee0c4f726 100644
--- a/include/boost/process/v1/child.hpp
+++ b/include/boost/process/v1/child.hpp
@@ -28,15 +28,15 @@
namespace boost {
///The main namespace of boost.process.
-namespace process {
+namespace process { BOOST_PROCESS_V1_INLINE namespace v1 {
template
child::child(Args&&...args)
- : child(::boost::process::detail::execute_impl(std::forward(args)...)) {}
+ : child(::boost::process::v1::detail::execute_impl(std::forward(args)...)) {}
///Typedef for the type of an pid_t
-typedef ::boost::process::detail::api::pid_t pid_t;
+typedef ::boost::process::v1::detail::api::pid_t pid_t;
#if defined(BOOST_PROCESS_DOXYGEN)
/** The main class to hold a child process. It is simliar to [std::thread](http://en.cppreference.com/w/cpp/thread/thread),
@@ -149,6 +149,6 @@ class child
#endif
-}}
+}}}
#endif
diff --git a/include/boost/process/v1/cmd.hpp b/include/boost/process/v1/cmd.hpp
index 8e63f87fe..7b36eba65 100644
--- a/include/boost/process/v1/cmd.hpp
+++ b/include/boost/process/v1/cmd.hpp
@@ -25,20 +25,20 @@
/** \file boost/process/cmd.hpp
*
- * This header provides the \xmlonly cmd\endxmlonly property.
+ * This header provides the \xmlonly cmd\endxmlonly property.
*
\xmlonly
namespace boost {
- namespace process {
- unspecified cmd;
+ namespace process { BOOST_PROCESS_V1_INLINE namespace v1 {
+ unspecified cmd;
}
}
\endxmlonly
*/
-namespace boost { namespace process { namespace detail {
+namespace boost { namespace process { BOOST_PROCESS_V1_INLINE namespace v1 { namespace detail {
struct cmd_
@@ -47,8 +47,7 @@ struct cmd_
template
inline api::cmd_setter_ operator()(const Char *s) const
- {
- return api::cmd_setter_(s);
+ { return api::cmd_setter_(s);
}
template
inline api::cmd_setter_ operator= (const Char *s) const
@@ -77,7 +76,7 @@ struct char_converter>
{
static api::cmd_setter_ conv(const api::cmd_setter_ & in)
{
- return { ::boost::process::detail::convert(in.str()) };
+ return { ::boost::process::v1::detail::convert(in.str()) };
}
};
@@ -86,7 +85,7 @@ struct char_converter>
{
static api::cmd_setter_ conv(const api::cmd_setter_ & in)
{
- return { ::boost::process::detail::convert(in.str()) };
+ return { ::boost::process::v1::detail::convert(in.str()) };
}
};
@@ -115,8 +114,8 @@ The property can only be used for assignments.
*/
-constexpr static ::boost::process::detail::cmd_ cmd;
+constexpr static ::boost::process::v1::detail::cmd_ cmd;
-}}
+}}}
#endif
diff --git a/include/boost/process/v1/detail/async_handler.hpp b/include/boost/process/v1/detail/async_handler.hpp
index dd07b19e1..99601daeb 100644
--- a/include/boost/process/v1/detail/async_handler.hpp
+++ b/include/boost/process/v1/detail/async_handler.hpp
@@ -21,16 +21,16 @@
namespace boost {
-namespace process {
+namespace process { BOOST_PROCESS_V1_INLINE namespace v1 {
namespace detail {
#if defined(BOOST_POSIX_API)
-using ::boost::process::detail::posix::is_async_handler;
-using ::boost::process::detail::posix::does_require_io_context;
+using ::boost::process::v1::detail::posix::is_async_handler;
+using ::boost::process::v1::detail::posix::does_require_io_context;
#else
-using ::boost::process::detail::windows::is_async_handler;
-using ::boost::process::detail::windows::does_require_io_context;
+using ::boost::process::v1::detail::windows::is_async_handler;
+using ::boost::process::v1::detail::windows::does_require_io_context;
#endif
template
@@ -112,6 +112,7 @@ boost::asio::io_context &get_io_context_var(First&, Args&...args)
}
}
}
+}
#endif /* BOOST_PROCESS_DETAIL_ASYNC_HANDLER_HPP_ */
diff --git a/include/boost/process/v1/detail/basic_cmd.hpp b/include/boost/process/v1/detail/basic_cmd.hpp
index eeaecdb39..8064978af 100644
--- a/include/boost/process/v1/detail/basic_cmd.hpp
+++ b/include/boost/process/v1/detail/basic_cmd.hpp
@@ -26,7 +26,7 @@
#include
-namespace boost { namespace process { namespace detail {
+namespace boost { namespace process { BOOST_PROCESS_V1_INLINE namespace v1 { namespace detail {
template
struct exe_setter_
@@ -47,7 +47,7 @@ struct char_converter>
{
static exe_setter_ conv(const exe_setter_ & in)
{
- return {::boost::process::detail::convert(in.exe_)};
+ return {::boost::process::v1::detail::convert(in.exe_)};
}
};
@@ -56,7 +56,7 @@ struct char_converter>
{
static exe_setter_ conv(const exe_setter_ & in)
{
- return {::boost::process::detail::convert(in.exe_)};
+ return {::boost::process::v1::detail::convert(in.exe_)};
}
};
@@ -105,7 +105,7 @@ struct char_converter>
std::transform(in._args.begin(), in._args.end(), vec.begin(),
[](const std::wstring & ws)
{
- return ::boost::process::detail::convert(ws);
+ return ::boost::process::v1::detail::convert(ws);
});
return {vec};
}
@@ -120,7 +120,7 @@ struct char_converter>
std::transform(in._args.begin(), in._args.end(), vec.begin(),
[](const std::string & ws)
{
- return ::boost::process::detail::convert(ws);
+ return ::boost::process::v1::detail::convert(ws);
});
return {vec};
@@ -136,7 +136,7 @@ struct char_converter>
std::transform(in._args.begin(), in._args.end(), vec.begin(),
[](const std::wstring & ws)
{
- return ::boost::process::detail::convert(ws);
+ return ::boost::process::v1::detail::convert(ws);
});
return {vec}; }
};
@@ -150,7 +150,7 @@ struct char_converter>
std::transform(in._args.begin(), in._args.end(), vec.begin(),
[](const std::string & ws)
{
- return ::boost::process::detail::convert(ws);
+ return ::boost::process::v1::detail::convert(ws);
});
return {vec};
}
@@ -168,7 +168,7 @@ struct exe_builder
string_type exe;
std::vector args;
- void operator()(const boost::process::filesystem::path & data)
+ void operator()(const boost::process::v1::filesystem::path & data)
{
not_cmd = true;
if (exe.empty())
@@ -285,7 +285,7 @@ struct initializer_builder>
typedef exe_builder type;
};
-}}}
+}}}}
diff --git a/include/boost/process/v1/detail/child_decl.hpp b/include/boost/process/v1/detail/child_decl.hpp
index 0a3f23467..bb84e93af 100644
--- a/include/boost/process/v1/detail/child_decl.hpp
+++ b/include/boost/process/v1/detail/child_decl.hpp
@@ -38,23 +38,23 @@
#endif
namespace boost {
-namespace process {
+namespace process { BOOST_PROCESS_V1_INLINE namespace v1 {
-using ::boost::process::detail::api::pid_t;
+using ::boost::process::v1::detail::api::pid_t;
class child
{
- ::boost::process::detail::api::child_handle _child_handle;
- std::shared_ptr> _exit_status = std::make_shared>(::boost::process::detail::api::still_active);
+ ::boost::process::v1::detail::api::child_handle _child_handle;
+ std::shared_ptr> _exit_status = std::make_shared>(::boost::process::v1::detail::api::still_active);
bool _attached = true;
bool _terminated = false;
bool _exited()
{
- return _terminated || !::boost::process::detail::api::is_running(_exit_status->load());
+ return _terminated || !::boost::process::v1::detail::api::is_running(_exit_status->load());
};
public:
- typedef ::boost::process::detail::api::child_handle child_handle;
+ typedef ::boost::process::v1::detail::api::child_handle child_handle;
typedef child_handle::process_handle_t native_handle_t;
explicit child(child_handle &&ch, std::shared_ptr> &ptr) : _child_handle(std::move(ch)), _exit_status(ptr) {}
explicit child(child_handle &&ch, const std::shared_ptr> &ptr) : _child_handle(std::move(ch)), _exit_status(ptr) {}
@@ -98,7 +98,7 @@ class child
native_handle_t native_handle() const { return _child_handle.process_handle(); }
- int exit_code() const {return ::boost::process::detail::api::eval_exit_status(_exit_status->load());}
+ int exit_code() const {return ::boost::process::v1::detail::api::eval_exit_status(_exit_status->load());}
pid_t id() const {return _child_handle.id(); }
int native_exit_code() const {return _exit_status->load();}
@@ -107,7 +107,7 @@ class child
{
std::error_code ec;
bool b = running(ec);
- boost::process::detail::throw_error(ec, "running error");
+ boost::process::v1::detail::throw_error(ec, "running error");
return b;
}
@@ -115,14 +115,14 @@ class child
{
std::error_code ec;
terminate(ec);
- boost::process::detail::throw_error(ec, "terminate error");
+ boost::process::v1::detail::throw_error(ec, "terminate error");
}
void wait()
{
std::error_code ec;
wait(ec);
- boost::process::detail::throw_error(ec, "wait error");
+ boost::process::v1::detail::throw_error(ec, "wait error");
}
#if !defined(BOOST_PROCESS_NO_DEPRECATED)
@@ -133,7 +133,7 @@ class child
{
std::error_code ec;
bool b = wait_for(rel_time, ec);
- boost::process::detail::throw_error(ec, "wait_for error");
+ boost::process::v1::detail::throw_error(ec, "wait_for error");
return b;
}
@@ -143,7 +143,7 @@ class child
{
std::error_code ec;
bool b = wait_until(timeout_time, ec);
- boost::process::detail::throw_error(ec, "wait_until error");
+ boost::process::v1::detail::throw_error(ec, "wait_until error");
return b;
}
#endif
@@ -154,7 +154,7 @@ class child
if (valid() && !_exited() && !ec)
{
int exit_code = 0;
- auto res = boost::process::detail::api::is_running(_child_handle, exit_code, ec);
+ auto res = boost::process::v1::detail::api::is_running(_child_handle, exit_code, ec);
if (!ec && !res && !_exited())
_exit_status->store(exit_code);
@@ -166,7 +166,7 @@ class child
void terminate(std::error_code & ec) noexcept
{
if (valid() && running(ec) && !ec)
- boost::process::detail::api::terminate(_child_handle, ec);
+ boost::process::v1::detail::api::terminate(_child_handle, ec);
if (!ec)
_terminated = true;
@@ -177,7 +177,7 @@ class child
if (!_exited() && valid())
{
int exit_code = 0;
- boost::process::detail::api::wait(_child_handle, exit_code, ec);
+ boost::process::v1::detail::api::wait(_child_handle, exit_code, ec);
if (!ec)
_exit_status->store(exit_code);
}
@@ -198,7 +198,7 @@ class child
if (!_exited())
{
int exit_code = 0;
- auto b = boost::process::detail::api::wait_until(_child_handle, exit_code, timeout_time, ec);
+ auto b = boost::process::v1::detail::api::wait_until(_child_handle, exit_code, timeout_time, ec);
if (!b || ec)
return false;
_exit_status->store(exit_code);
@@ -225,6 +225,7 @@ class child
-}}
+}}}
+
#endif
diff --git a/include/boost/process/v1/detail/config.hpp b/include/boost/process/v1/detail/config.hpp
index b7659a08e..60978cc01 100644
--- a/include/boost/process/v1/detail/config.hpp
+++ b/include/boost/process/v1/detail/config.hpp
@@ -21,6 +21,16 @@
#include
#include
+#if !defined(BOOST_PROCESS_VERSION)
+#define BOOST_PROCESS_VERSION 1
+#endif
+
+#if BOOST_PROCESS_VERSION == 1
+#define BOOST_PROCESS_V1_INLINE inline
+#else
+#define BOOST_PROCESS_V1_INLINE
+#endif
+
#include
#include
#include
@@ -38,7 +48,9 @@ extern char **environ;
#error "System API not supported by boost.process"
#endif
-namespace boost { namespace process { namespace detail
+
+
+namespace boost { namespace process { BOOST_PROCESS_V1_INLINE namespace v1 { namespace detail
{
#if !defined(BOOST_PROCESS_PIPE_SIZE)
@@ -121,5 +133,7 @@ template<> constexpr wchar_t space_sign () {return L' '; }
}
}
}
+}
+
#endif
diff --git a/include/boost/process/v1/detail/execute_impl.hpp b/include/boost/process/v1/detail/execute_impl.hpp
index 6bbc9b1a5..9f305250d 100644
--- a/include/boost/process/v1/detail/execute_impl.hpp
+++ b/include/boost/process/v1/detail/execute_impl.hpp
@@ -40,7 +40,7 @@
#include
#include
-namespace boost { namespace process {
+namespace boost { namespace process { BOOST_PROCESS_V1_INLINE namespace v1 {
class child;
@@ -228,7 +228,7 @@ inline child basic_execute_impl(Args && ... args)
boost::fusion::tuple::type&...> tup(args...);
auto inits = boost::fusion::filter_if<
- boost::process::detail::is_initializer<
+ boost::process::v1::detail::is_initializer<
typename std::remove_reference<
boost::mpl::_
>::type
@@ -237,7 +237,7 @@ inline child basic_execute_impl(Args && ... args)
auto others = boost::fusion::filter_if<
boost::mpl::not_<
- boost::process::detail::is_initializer<
+ boost::process::v1::detail::is_initializer<
typename std::remove_reference<
boost::mpl::_
>::type
@@ -250,20 +250,20 @@ inline child basic_execute_impl(Args && ... args)
//typedef typename boost::fusion::result_of::as_vector::type inits_t;
typedef typename boost::fusion::result_of::as_vector::type others_t;
// typedef decltype(others) others_t;
- typedef typename ::boost::process::detail::make_builders_from_view<
+ typedef typename ::boost::process::v1::detail::make_builders_from_view<
typename boost::fusion::result_of::begin::type,
typename boost::fusion::result_of::end ::type>::type builder_t;
builder_t builders;
- ::boost::process::detail::builder_ref builder_ref(builders);
+ ::boost::process::v1::detail::builder_ref builder_ref(builders);
boost::fusion::for_each(others, builder_ref);
- auto other_inits = ::boost::process::detail::get_initializers(builders);
+ auto other_inits = ::boost::process::v1::detail::get_initializers(builders);
boost::fusion::joint_view complete_inits(other_inits, inits);
- auto exec = boost::process::detail::api::make_executor(complete_inits);
+ auto exec = boost::process::v1::detail::api::make_executor(complete_inits);
return exec();
}
@@ -273,12 +273,11 @@ inline child execute_impl(Args&& ... args)
typedef required_char_type_t req_char_type;
return basic_execute_impl(
- boost::process::detail::char_converter_t::conv(
+ boost::process::v1::detail::char_converter_t::conv(
std::forward(args))...
);
}
-}}}
-
+}}}}
#endif
diff --git a/include/boost/process/v1/detail/handler.hpp b/include/boost/process/v1/detail/handler.hpp
index a78aba059..a12aec543 100644
--- a/include/boost/process/v1/detail/handler.hpp
+++ b/include/boost/process/v1/detail/handler.hpp
@@ -16,7 +16,7 @@
#endif
-namespace boost { namespace process { namespace detail {
+namespace boost { namespace process { BOOST_PROCESS_V1_INLINE namespace v1 { namespace detail {
//extended handler base.
typedef api::handler_base_ext handler;
@@ -68,8 +68,6 @@ struct on_success_ : handler
-}}
-
-
+}}}
#endif /* BOOST_PROCESS_DETAIL_HANDLER_HPP_ */
diff --git a/include/boost/process/v1/detail/handler_base.hpp b/include/boost/process/v1/detail/handler_base.hpp
index 93a80520e..732b13c42 100644
--- a/include/boost/process/v1/detail/handler_base.hpp
+++ b/include/boost/process/v1/detail/handler_base.hpp
@@ -11,9 +11,10 @@
#ifndef BOOST_PROCESS_DETAIL_HANDLER_BASE_HPP
#define BOOST_PROCESS_DETAIL_HANDLER_BASE_HPP
+#include
#include
-namespace boost { namespace process { namespace detail {
+namespace boost { namespace process { BOOST_PROCESS_V1_INLINE namespace v1 { namespace detail {
template class Template>
struct make_handler_t
@@ -44,6 +45,6 @@ struct handler_base
};
-}}}
+}}}}
#endif
diff --git a/include/boost/process/v1/detail/on_exit.hpp b/include/boost/process/v1/detail/on_exit.hpp
index 05ab5341f..41f351651 100644
--- a/include/boost/process/v1/detail/on_exit.hpp
+++ b/include/boost/process/v1/detail/on_exit.hpp
@@ -17,7 +17,7 @@
#include
#include
-namespace boost { namespace process { namespace detail {
+namespace boost { namespace process { BOOST_PROCESS_V1_INLINE namespace v1 { namespace detail {
inline std::function on_exit_from_future(std::future &f)
{
@@ -46,8 +46,9 @@ struct on_exit_
}
-constexpr static ::boost::process::detail::on_exit_ on_exit{};
+constexpr static ::boost::process::v1::detail::on_exit_ on_exit{};
-}}
+}}}
+
#endif /* INCLUDE_BOOST_PROCESS_WINDOWS_ON_EXIT_HPP_ */
diff --git a/include/boost/process/v1/detail/posix/asio_fwd.hpp b/include/boost/process/v1/detail/posix/asio_fwd.hpp
index 2c9e7c67d..48c22de4f 100644
--- a/include/boost/process/v1/detail/posix/asio_fwd.hpp
+++ b/include/boost/process/v1/detail/posix/asio_fwd.hpp
@@ -38,7 +38,7 @@ typedef basic_stream_descriptor stream_descriptor;
} //posix
} //asio
-namespace process { namespace detail { namespace posix {
+namespace process { BOOST_PROCESS_V1_INLINE namespace v1 { namespace detail { namespace posix {
class async_pipe;
@@ -54,8 +54,9 @@ struct async_out_future;
} // posix
} // detail
-using ::boost::process::detail::posix::async_pipe;
+using ::boost::process::v1::detail::posix::async_pipe;
+} // v1
} // process
} // boost
diff --git a/include/boost/process/v1/detail/posix/async_handler.hpp b/include/boost/process/v1/detail/posix/async_handler.hpp
index 473f8f6fa..b285f32be 100644
--- a/include/boost/process/v1/detail/posix/async_handler.hpp
+++ b/include/boost/process/v1/detail/posix/async_handler.hpp
@@ -10,7 +10,7 @@
#include
#include
-namespace boost { namespace process { namespace detail { namespace posix {
+namespace boost { namespace process { BOOST_PROCESS_V1_INLINE namespace v1 { namespace detail { namespace posix {
struct require_io_context {};
@@ -35,6 +35,6 @@ template
struct does_require_io_context : std::is_base_of {};
-}}}}
+}}}}}
#endif /* BOOST_PROCESS_WINDOWS_ASYNC_HANDLER_HPP_ */
diff --git a/include/boost/process/v1/detail/posix/async_in.hpp b/include/boost/process/v1/detail/posix/async_in.hpp
index 5ce6519ad..558e80bbc 100644
--- a/include/boost/process/v1/detail/posix/async_in.hpp
+++ b/include/boost/process/v1/detail/posix/async_in.hpp
@@ -19,13 +19,13 @@
#include
#include
-namespace boost { namespace process { namespace detail { namespace posix {
+namespace boost { namespace process { BOOST_PROCESS_V1_INLINE namespace v1 { namespace detail { namespace posix {
template
-struct async_in_buffer : ::boost::process::detail::posix::handler_base_ext,
- ::boost::process::detail::posix::require_io_context,
- ::boost::process::detail::uses_handles
+struct async_in_buffer : ::boost::process::v1::detail::posix::handler_base_ext,
+ ::boost::process::v1::detail::posix::require_io_context,
+ ::boost::process::v1::detail::uses_handles
{
Buffer & buf;
@@ -37,7 +37,7 @@ struct async_in_buffer : ::boost::process::detail::posix::handler_base_ext,
}
- std::shared_ptr pipe;
+ std::shared_ptr pipe;
async_in_buffer(Buffer & buf) : buf(buf)
{
@@ -81,7 +81,7 @@ struct async_in_buffer : ::boost::process::detail::posix::handler_base_ext,
void on_setup(Executor & exec)
{
if (!pipe)
- pipe = std::make_shared(get_io_context(exec.seq));
+ pipe = std::make_shared(get_io_context(exec.seq));
}
std::array get_used_handles()
@@ -97,7 +97,7 @@ struct async_in_buffer : ::boost::process::detail::posix::handler_base_ext,
void on_exec_setup(Executor &exec)
{
if (::dup2(pipe->native_source(), STDIN_FILENO) == -1)
- exec.set_error(::boost::process::detail::get_last_error(), "dup2() failed");
+ exec.set_error(::boost::process::v1::detail::get_last_error(), "dup2() failed");
if (pipe->native_source() != STDIN_FILENO)
::close(pipe->native_source());
@@ -106,6 +106,6 @@ struct async_in_buffer : ::boost::process::detail::posix::handler_base_ext,
};
-}}}}
+}}}}}
#endif
diff --git a/include/boost/process/v1/detail/posix/async_out.hpp b/include/boost/process/v1/detail/posix/async_out.hpp
index 62f03bd26..1fef5bb07 100644
--- a/include/boost/process/v1/detail/posix/async_out.hpp
+++ b/include/boost/process/v1/detail/posix/async_out.hpp
@@ -22,7 +22,7 @@
#include
#include
-namespace boost { namespace process { namespace detail { namespace posix {
+namespace boost { namespace process { BOOST_PROCESS_V1_INLINE namespace v1 { namespace detail { namespace posix {
inline int apply_out_handles(int handle, std::integral_constant, std::integral_constant)
@@ -46,13 +46,13 @@ inline int apply_out_handles(int handle, std::integral_constant, std::in
}
template
-struct async_out_buffer : ::boost::process::detail::posix::handler_base_ext,
- ::boost::process::detail::posix::require_io_context,
- ::boost::process::detail::uses_handles
+struct async_out_buffer : ::boost::process::v1::detail::posix::handler_base_ext,
+ ::boost::process::v1::detail::posix::require_io_context,
+ ::boost::process::v1::detail::uses_handles
{
Buffer & buf;
- std::shared_ptr pipe;
+ std::shared_ptr pipe;
std::array get_used_handles()
{
@@ -90,7 +90,7 @@ struct async_out_buffer : ::boost::process::detail::posix::handler_base_ext,
template
void on_setup(Executor & exec)
{
- pipe = std::make_shared(get_io_context(exec.seq));
+ pipe = std::make_shared(get_io_context(exec.seq));
}
@@ -100,7 +100,7 @@ struct async_out_buffer : ::boost::process::detail::posix::handler_base_ext,
int res = apply_out_handles(pipe->native_sink(),
std::integral_constant(), std::integral_constant());
if (res == -1)
- exec.set_error(::boost::process::detail::get_last_error(), "dup2() failed");
+ exec.set_error(::boost::process::v1::detail::get_last_error(), "dup2() failed");
::close(pipe->native_sink());
::close(pipe->native_source());
@@ -112,14 +112,14 @@ struct async_out_buffer : ::boost::process::detail::posix::handler_base_ext,
template
-struct async_out_future : ::boost::process::detail::posix::handler_base_ext,
- ::boost::process::detail::posix::require_io_context
+struct async_out_future : ::boost::process::v1::detail::posix::handler_base_ext,
+ ::boost::process::v1::detail::posix::require_io_context
{
std::shared_ptr> promise = std::make_shared>();
std::shared_ptr buffer = std::make_shared();
- std::shared_ptr pipe;
+ std::shared_ptr pipe;
async_out_future(std::future & fut)
{
@@ -167,7 +167,7 @@ struct async_out_future : ::boost::process::detail::posix::handler_base_ext,
template
void on_setup(Executor & exec)
{
- pipe = std::make_shared(get_io_context(exec.seq));
+ pipe = std::make_shared(get_io_context(exec.seq));
}
template
@@ -177,7 +177,7 @@ struct async_out_future : ::boost::process::detail::posix::handler_base_ext,
int res = apply_out_handles(pipe->native_sink(),
std::integral_constant(), std::integral_constant());
if (res == -1)
- exec.set_error(::boost::process::detail::get_last_error(), "dup2() failed");
+ exec.set_error(::boost::process::v1::detail::get_last_error(), "dup2() failed");
::close(pipe->native_sink());
::close(pipe->native_source());
@@ -185,6 +185,6 @@ struct async_out_future : ::boost::process::detail::posix::handler_base_ext,
};
-}}}}
+}}}}}
#endif
diff --git a/include/boost/process/v1/detail/posix/async_pipe.hpp b/include/boost/process/v1/detail/posix/async_pipe.hpp
index 279ede1f3..350ba407b 100644
--- a/include/boost/process/v1/detail/posix/async_pipe.hpp
+++ b/include/boost/process/v1/detail/posix/async_pipe.hpp
@@ -14,7 +14,7 @@
#include
#include
-namespace boost { namespace process { namespace detail { namespace posix {
+namespace boost { namespace process { BOOST_PROCESS_V1_INLINE namespace v1 { namespace detail { namespace posix {
class async_pipe
{
@@ -37,7 +37,7 @@ class async_pipe
{
int fds[2];
if (::pipe(fds) == -1)
- boost::process::detail::throw_last_error("pipe(2) failed");
+ boost::process::v1::detail::throw_last_error("pipe(2) failed");
_source.assign(fds[0]);
_sink .assign(fds[1]);
@@ -205,18 +205,18 @@ async_pipe::async_pipe(boost::asio::io_context & ios_source,
auto fifo = mkfifo(name.c_str(), 0666 );
if (fifo != 0)
- boost::process::detail::throw_last_error("mkfifo() failed");
+ boost::process::v1::detail::throw_last_error("mkfifo() failed");
int read_fd = open(name.c_str(), O_RDWR);
if (read_fd == -1)
- boost::process::detail::throw_last_error();
+ boost::process::v1::detail::throw_last_error();
int write_fd = dup(read_fd);
if (write_fd == -1)
- boost::process::detail::throw_last_error();
+ boost::process::v1::detail::throw_last_error();
_source.assign(read_fd);
_sink .assign(write_fd);
@@ -236,7 +236,7 @@ async_pipe::async_pipe(const async_pipe & p) :
{
_source.assign(::dup(source_in));
if (_source.native_handle()== -1)
- ::boost::process::detail::throw_last_error("dup()");
+ ::boost::process::v1::detail::throw_last_error("dup()");
}
if (sink_in == -1)
@@ -245,7 +245,7 @@ async_pipe::async_pipe(const async_pipe & p) :
{
_sink.assign(::dup(sink_in));
if (_sink.native_handle() == -1)
- ::boost::process::detail::throw_last_error("dup()");
+ ::boost::process::v1::detail::throw_last_error("dup()");
}
}
@@ -263,7 +263,7 @@ async_pipe& async_pipe::operator=(const async_pipe & p)
{
source = ::dup(source_in);
if (source == -1)
- ::boost::process::detail::throw_last_error("dup()");
+ ::boost::process::v1::detail::throw_last_error("dup()");
}
if (sink_in == -1)
@@ -272,7 +272,7 @@ async_pipe& async_pipe::operator=(const async_pipe & p)
{
sink = ::dup(sink_in);
if (sink == -1)
- ::boost::process::detail::throw_last_error("dup()");
+ ::boost::process::v1::detail::throw_last_error("dup()");
}
_source.assign(source);
_sink. assign(sink);
@@ -304,7 +304,7 @@ async_pipe::operator basic_pipe() const
{
source = ::dup(source_in);
if (source == -1)
- ::boost::process::detail::throw_last_error("dup()");
+ ::boost::process::v1::detail::throw_last_error("dup()");
}
if (sink_in == -1)
@@ -313,7 +313,7 @@ async_pipe::operator basic_pipe() const
{
sink = ::dup(sink_in);
if (sink == -1)
- ::boost::process::detail::throw_last_error("dup()");
+ ::boost::process::v1::detail::throw_last_error("dup()");
}
return basic_pipe{source, sink};
@@ -360,6 +360,6 @@ inline bool operator!=(const basic_pipe & lhs, const async_pipe &
!compare_handles(lhs.native_sink(), rhs.native_sink());
}
-}}}}
+}}}}}
#endif /* INCLUDE_BOOST_PIPE_DETAIL_WINDOWS_ASYNC_PIPE_HPP_ */
diff --git a/include/boost/process/v1/detail/posix/basic_cmd.hpp b/include/boost/process/v1/detail/posix/basic_cmd.hpp
index 3f7deed54..5423d5c91 100644
--- a/include/boost/process/v1/detail/posix/basic_cmd.hpp
+++ b/include/boost/process/v1/detail/posix/basic_cmd.hpp
@@ -7,6 +7,7 @@
#ifndef BOOST_PROCESS_DETAIL_POSIX_BASIC_CMD_HPP_
#define BOOST_PROCESS_DETAIL_POSIX_BASIC_CMD_HPP_
+#include
#include
#include
#include
@@ -20,12 +21,13 @@ namespace boost
{
namespace process
{
+BOOST_PROCESS_V1_INLINE namespace v1
+{
namespace detail
{
namespace posix
{
-
inline std::string build_cmd_shell(const std::string & exe, std::vector && data)
{
std::string st = exe;
@@ -101,7 +103,7 @@ template
struct exe_cmd_init;
template<>
-struct exe_cmd_init : boost::process::detail::api::handler_base_ext
+struct exe_cmd_init : boost::process::v1::detail::api::handler_base_ext
{
exe_cmd_init(const exe_cmd_init & ) = delete;
exe_cmd_init(exe_cmd_init && ) = default;
@@ -175,6 +177,6 @@ std::vector exe_cmd_init::make_cmd()
}
-}}}}
+}}}}}
#endif
diff --git a/include/boost/process/v1/detail/posix/basic_pipe.hpp b/include/boost/process/v1/detail/posix/basic_pipe.hpp
index c46c8e80a..9316298ef 100644
--- a/include/boost/process/v1/detail/posix/basic_pipe.hpp
+++ b/include/boost/process/v1/detail/posix/basic_pipe.hpp
@@ -19,7 +19,7 @@
#include
#include
-namespace boost { namespace process { namespace detail { namespace posix {
+namespace boost { namespace process { BOOST_PROCESS_V1_INLINE namespace v1 { namespace detail { namespace posix {
template>
@@ -41,7 +41,7 @@ class basic_pipe
{
int fds[2];
if (::pipe(fds) == -1)
- boost::process::detail::throw_last_error("pipe(2) failed");
+ boost::process::v1::detail::throw_last_error("pipe(2) failed");
_source = fds[0];
_sink = fds[1];
@@ -85,7 +85,7 @@ class basic_pipe
//Try again if interrupted
auto err = errno;
if (err != EINTR)
- ::boost::process::detail::throw_last_error();
+ ::boost::process::v1::detail::throw_last_error();
}
return static_cast(write_len);
}
@@ -97,7 +97,7 @@ class basic_pipe
//Try again if interrupted
auto err = errno;
if (err != EINTR)
- ::boost::process::detail::throw_last_error();
+ ::boost::process::v1::detail::throw_last_error();
}
return static_cast(read_len);
}
@@ -126,13 +126,13 @@ basic_pipe::basic_pipe(const basic_pipe & rhs)
{
_source = ::dup(rhs._source);
if (_source == -1)
- ::boost::process::detail::throw_last_error("dup() failed");
+ ::boost::process::v1::detail::throw_last_error("dup() failed");
}
if (rhs._sink != -1)
{
_sink = ::dup(rhs._sink);
if (_sink == -1)
- ::boost::process::detail::throw_last_error("dup() failed");
+ ::boost::process::v1::detail::throw_last_error("dup() failed");
}
}
@@ -144,13 +144,13 @@ basic_pipe &basic_pipe::operator=(const basic_pipe
{
_source = ::dup(rhs._source);
if (_source == -1)
- ::boost::process::detail::throw_last_error("dup() failed");
+ ::boost::process::v1::detail::throw_last_error("dup() failed");
}
if (rhs._sink != -1)
{
_sink = ::dup(rhs._sink);
if (_sink == -1)
- ::boost::process::detail::throw_last_error("dup() failed");
+ ::boost::process::v1::detail::throw_last_error("dup() failed");
}
return *this;
@@ -163,18 +163,18 @@ basic_pipe::basic_pipe(const std::string & name)
auto fifo = mkfifo(name.c_str(), 0666 );
if (fifo != 0)
- boost::process::detail::throw_last_error("mkfifo() failed");
+ boost::process::v1::detail::throw_last_error("mkfifo() failed");
int read_fd = open(name.c_str(), O_RDWR);
if (read_fd == -1)
- boost::process::detail::throw_last_error();
+ boost::process::v1::detail::throw_last_error();
int write_fd = dup(read_fd);
if (write_fd == -1)
- boost::process::detail::throw_last_error();
+ boost::process::v1::detail::throw_last_error();
_sink = write_fd;
_source = read_fd;
@@ -195,6 +195,6 @@ inline bool operator!=(const basic_pipe & lhs, const basic_pipe
#include
-namespace boost { namespace process { namespace detail { namespace posix {
+namespace boost { namespace process { BOOST_PROCESS_V1_INLINE namespace v1 { namespace detail { namespace posix {
typedef ::pid_t pid_t;
@@ -55,6 +55,6 @@ struct child_handle
}
};
-}}}}
+}}}}}
#endif
diff --git a/include/boost/process/v1/detail/posix/close_in.hpp b/include/boost/process/v1/detail/posix/close_in.hpp
index eb76968ab..c209d8a81 100644
--- a/include/boost/process/v1/detail/posix/close_in.hpp
+++ b/include/boost/process/v1/detail/posix/close_in.hpp
@@ -14,21 +14,21 @@
#include
#include
-namespace boost { namespace process { namespace detail { namespace posix {
+namespace boost { namespace process { BOOST_PROCESS_V1_INLINE namespace v1 { namespace detail { namespace posix {
-struct close_in : handler_base_ext, ::boost::process::detail::uses_handles
+struct close_in : handler_base_ext, ::boost::process::v1::detail::uses_handles
{
template
void on_exec_setup(Executor &e) const
{
if (::close(STDIN_FILENO) == -1)
- e.set_error(::boost::process::detail::get_last_error(), "close() failed");
+ e.set_error(::boost::process::v1::detail::get_last_error(), "close() failed");
}
int get_used_handles() {return STDIN_FILENO;}
};
-}}}}
+}}}}}
#endif
diff --git a/include/boost/process/v1/detail/posix/close_out.hpp b/include/boost/process/v1/detail/posix/close_out.hpp
index aae260240..1bc3669d2 100644
--- a/include/boost/process/v1/detail/posix/close_out.hpp
+++ b/include/boost/process/v1/detail/posix/close_out.hpp
@@ -14,7 +14,7 @@
#include
#include
-namespace boost { namespace process { namespace detail { namespace posix {
+namespace boost { namespace process { BOOST_PROCESS_V1_INLINE namespace v1 { namespace detail { namespace posix {
template
struct close_out : handler_base_ext
@@ -30,7 +30,7 @@ template
void close_out<1,-1>::on_exec_setup(Executor &e) const
{
if (::close(STDOUT_FILENO) == -1)
- e.set_error(::boost::process::detail::get_last_error(), "close() failed");
+ e.set_error(::boost::process::v1::detail::get_last_error(), "close() failed");
}
@@ -39,7 +39,7 @@ template
void close_out<2,-1>::on_exec_setup(Executor &e) const
{
if (::close(STDERR_FILENO) == -1)
- e.set_error(::boost::process::detail::get_last_error(), "close() failed");
+ e.set_error(::boost::process::v1::detail::get_last_error(), "close() failed");
}
template<>
@@ -47,12 +47,12 @@ template
void close_out<1,2>::on_exec_setup(Executor &e) const
{
if (::close(STDOUT_FILENO) == -1)
- e.set_error(::boost::process::detail::get_last_error(), "close() failed");
+ e.set_error(::boost::process::v1::detail::get_last_error(), "close() failed");
if (::close(STDERR_FILENO) == -1)
- e.set_error(::boost::process::detail::get_last_error(), "close() failed");
+ e.set_error(::boost::process::v1::detail::get_last_error(), "close() failed");
}
-}}}}
+}}}}}
#endif
diff --git a/include/boost/process/v1/detail/posix/cmd.hpp b/include/boost/process/v1/detail/posix/cmd.hpp
index 6b47b3e64..caa0a4310 100644
--- a/include/boost/process/v1/detail/posix/cmd.hpp
+++ b/include/boost/process/v1/detail/posix/cmd.hpp
@@ -16,6 +16,8 @@ namespace boost
{
namespace process
{
+BOOST_PROCESS_V1_INLINE namespace v1
+{
namespace detail
{
namespace posix
@@ -99,6 +101,6 @@ std::vector cmd_setter_::make_cmd(std::vector
#include
-namespace boost { namespace process { namespace detail { namespace posix {
+namespace boost { namespace process { BOOST_PROCESS_V1_INLINE namespace v1 { namespace detail { namespace posix {
inline bool compare_handles(int lhs, int rhs)
@@ -25,8 +25,8 @@ inline bool compare_handles(int lhs, int rhs)
return true;
struct stat stat1, stat2;
- if(fstat(lhs, &stat1) < 0) ::boost::process::detail::throw_last_error("fstat() failed");
- if(fstat(rhs, &stat2) < 0) ::boost::process::detail::throw_last_error("fstat() failed");
+ if(fstat(lhs, &stat1) < 0) ::boost::process::v1::detail::throw_last_error("fstat() failed");
+ if(fstat(rhs, &stat2) < 0) ::boost::process::v1::detail::throw_last_error("fstat() failed");
return (stat1.st_dev == stat2.st_dev) && (stat1.st_ino == stat2.st_ino);
}
@@ -35,7 +35,7 @@ inline bool compare_handles(int lhs, int rhs)
-}}}}
+}}}}}
diff --git a/include/boost/process/v1/detail/posix/env_init.hpp b/include/boost/process/v1/detail/posix/env_init.hpp
index 4a1500839..9bf30e9a3 100644
--- a/include/boost/process/v1/detail/posix/env_init.hpp
+++ b/include/boost/process/v1/detail/posix/env_init.hpp
@@ -12,7 +12,7 @@
#include
#include
-namespace boost { namespace process { namespace detail { namespace posix {
+namespace boost { namespace process { BOOST_PROCESS_V1_INLINE namespace v1 { namespace detail { namespace posix {
template
struct env_init;
@@ -20,10 +20,10 @@ struct env_init;
template<>
struct env_init : handler_base_ext
{
- boost::process::environment env;
+ boost::process::v1::environment env;
- env_init(boost::process::environment && env) : env(std::move(env)) {};
- env_init(const boost::process::environment & env) : env(env) {};
+ env_init(boost::process::v1::environment && env) : env(std::move(env)) {};
+ env_init(const boost::process::v1::environment & env) : env(env) {};
template
@@ -34,7 +34,7 @@ struct env_init : handler_base_ext
};
-}}}}
+}}}}}
diff --git a/include/boost/process/v1/detail/posix/environment.hpp b/include/boost/process/v1/detail/posix/environment.hpp
index d55f12369..6ddfc559c 100644
--- a/include/boost/process/v1/detail/posix/environment.hpp
+++ b/include/boost/process/v1/detail/posix/environment.hpp
@@ -15,7 +15,7 @@
#include
-namespace boost { namespace process { namespace detail { namespace posix {
+namespace boost { namespace process { BOOST_PROCESS_V1_INLINE namespace v1 { namespace detail { namespace posix {
template
class native_environment_impl
@@ -27,7 +27,7 @@ class native_environment_impl
while (*p != nullptr)
{
std::string str = *p;
- val.push_back(::boost::process::detail::convert(str));
+ val.push_back(::boost::process::v1::detail::convert(str));
p++;
}
return val;
@@ -68,24 +68,24 @@ class native_environment_impl
string_type get(const string_type & id)
{
- std::string id_c = ::boost::process::detail::convert(id);
+ std::string id_c = ::boost::process::v1::detail::convert(id);
std::string g = ::getenv(id_c.c_str());
- return ::boost::process::detail::convert(g.c_str());
+ return ::boost::process::v1::detail::convert(g.c_str());
}
void set(const string_type & id, const string_type & value)
{
- std::string id_c = ::boost::process::detail::convert(id.c_str());
- std::string value_c = ::boost::process::detail::convert(value.c_str());
+ std::string id_c = ::boost::process::v1::detail::convert(id.c_str());
+ std::string value_c = ::boost::process::v1::detail::convert(value.c_str());
auto res = ::setenv(id_c.c_str(), value_c.c_str(), true);
if (res != 0)
- boost::process::detail::throw_last_error();
+ boost::process::v1::detail::throw_last_error();
}
void reset(const string_type & id)
{
- std::string id_c = ::boost::process::detail::convert(id.c_str());
+ std::string id_c = ::boost::process::v1::detail::convert(id.c_str());
auto res = ::unsetenv(id_c.c_str());
if (res != 0)
- ::boost::process::detail::throw_last_error();
+ ::boost::process::v1::detail::throw_last_error();
}
native_environment_impl() = default;
@@ -114,14 +114,14 @@ class native_environment_impl
{
auto res = ::setenv(id, value, 1);
if (res != 0)
- boost::process::detail::throw_last_error();
+ boost::process::v1::detail::throw_last_error();
reload();
}
void reset(const pointer_type id)
{
auto res = ::unsetenv(id);
if (res != 0)
- boost::process::detail::throw_last_error();
+ boost::process::v1::detail::throw_last_error();
reload();
}
@@ -186,13 +186,13 @@ struct basic_environment_impl
template
explicit inline basic_environment_impl(
const basic_environment_impl& rhs,
- const ::boost::process::codecvt_type & cv = ::boost::process::codecvt())
+ const ::boost::process::v1::codecvt_type & cv = ::boost::process::v1::codecvt())
: _data(rhs._data.size())
{
std::transform(rhs._data.begin(), rhs._data.end(), _data.begin(),
[&](const std::basic_string & st)
{
- return ::boost::process::detail::convert(st, cv);
+ return ::boost::process::v1::detail::convert(st, cv);
}
);
@@ -202,7 +202,7 @@ struct basic_environment_impl
template
basic_environment_impl & operator=(const basic_environment_impl& rhs)
{
- _data = ::boost::process::detail::convert(rhs._data);
+ _data = ::boost::process::v1::detail::convert(rhs._data);
_env_arr = _load_var(&*_data.begin());
_env_impl = &*_env_arr.begin();
return *this;
@@ -230,7 +230,7 @@ basic_environment_impl::basic_environment_impl(const native_environment_im
template
inline auto basic_environment_impl::get(const string_type &id) -> string_type
{
- auto itr = std::find_if(_data.begin(), _data.end(),
+ auto itr = std::find_if(_data.begin(), _data.end(),
[&](const string_type & st) -> bool
{
if (st.size() <= id.size())
@@ -250,7 +250,7 @@ inline auto basic_environment_impl::get(const string_type &id) -> string_t
template
inline void basic_environment_impl::set(const string_type &id, const string_type &value)
{
- auto itr = std::find_if(_data.begin(), _data.end(),
+ auto itr = std::find_if(_data.begin(), _data.end(),
[&](const string_type & st) -> bool
{
if (st.size() <= id.size())
@@ -261,7 +261,7 @@ inline void basic_environment_impl::set(const string_type &id, const strin
if (itr != _data.end())
*itr = id + equal_sign() + value;
- else
+ else
_data.push_back(id + equal_sign() + value);
reload();
@@ -270,7 +270,7 @@ inline void basic_environment_impl::set(const string_type &id, const strin
template
inline void basic_environment_impl::reset(const string_type &id)
{
- auto itr = std::find_if(_data.begin(), _data.end(),
+ auto itr = std::find_if(_data.begin(), _data.end(),
[&](const string_type & st) -> bool
{
if (st.size() <= id.size())
@@ -280,9 +280,9 @@ inline void basic_environment_impl::reset(const string_type &id)
);
if (itr != _data.end())
{
- _data.erase(itr);//and remove it
+ _data.erase(itr);//and remove it
}
-
+
reload();
@@ -320,7 +320,7 @@ inline int native_handle() {return getpid(); }
}
}
}
-
+}
diff --git a/include/boost/process/v1/detail/posix/exe.hpp b/include/boost/process/v1/detail/posix/exe.hpp
index 9de68acc4..8df0d53c4 100644
--- a/include/boost/process/v1/detail/posix/exe.hpp
+++ b/include/boost/process/v1/detail/posix/exe.hpp
@@ -7,11 +7,14 @@
#ifndef BOOST_PROCESS_DETAIL_POSIX_EXE_HPP_
#define BOOST_PROCESS_DETAIL_POSIX_EXE_HPP_
+#include
namespace boost
{
namespace process
{
+BOOST_PROCESS_V1_INLINE namespace v1
+{
namespace detail
{
namespace posix
@@ -30,7 +33,7 @@ inline void apply_exe(const StringType & exe, Executor & e)
}
}
}
-
+}
#endif /* INCLUDE_BOOST_PROCESS_WINDOWS_ARGS_HPP_ */
diff --git a/include/boost/process/v1/detail/posix/executor.hpp b/include/boost/process/v1/detail/posix/executor.hpp
index cc8321f26..cc1bcb6cf 100644
--- a/include/boost/process/v1/detail/posix/executor.hpp
+++ b/include/boost/process/v1/detail/posix/executor.hpp
@@ -28,7 +28,7 @@
#include
-namespace boost { namespace process { namespace detail { namespace posix {
+namespace boost { namespace process { BOOST_PROCESS_V1_INLINE namespace v1 { namespace detail { namespace posix {
template
struct on_setup_t
@@ -204,9 +204,9 @@ class executor
throw process_error(_ec, _msg);
}
- typedef typename ::boost::process::detail::has_error_handler::type has_error_handler;
- typedef typename ::boost::process::detail::has_ignore_error ::type has_ignore_error;
- typedef typename ::boost::process::detail::posix::shall_use_vfork::type shall_use_vfork;
+ typedef typename ::boost::process::v1::detail::has_error_handler::type has_error_handler;
+ typedef typename ::boost::process::v1::detail::has_ignore_error ::type has_ignore_error;
+ typedef typename ::boost::process::v1::detail::posix::shall_use_vfork::type shall_use_vfork;
inline child invoke(boost::mpl::true_ , boost::mpl::true_ );
inline child invoke(boost::mpl::false_, boost::mpl::true_ );
@@ -349,7 +349,7 @@ child executor::invoke(boost::mpl::true_, boost::mpl::false_) //ignore
this->pid = ::fork();
if (pid == -1)
{
- auto ec = boost::process::detail::get_last_error();
+ auto ec = boost::process::v1::detail::get_last_error();
boost::fusion::for_each(seq, call_on_fork_error(*this, ec));
return child();
}
@@ -357,7 +357,7 @@ child executor::invoke(boost::mpl::true_, boost::mpl::false_) //ignore
{
boost::fusion::for_each(seq, call_on_exec_setup(*this));
::execve(exe, cmd_line, env);
- auto ec = boost::process::detail::get_last_error();
+ auto ec = boost::process::v1::detail::get_last_error();
boost::fusion::for_each(seq, call_on_exec_error(*this, ec));
_exit(EXIT_FAILURE);
}
@@ -389,12 +389,12 @@ child executor::invoke(boost::mpl::false_, boost::mpl::false_)
if (::pipe(p.p) == -1)
{
- set_error(::boost::process::detail::get_last_error(), "pipe(2) failed");
+ set_error(::boost::process::v1::detail::get_last_error(), "pipe(2) failed");
return child();
}
if (::fcntl(p.p[1], F_SETFD, FD_CLOEXEC) == -1)
{
- auto err = ::boost::process::detail::get_last_error();
+ auto err = ::boost::process::v1::detail::get_last_error();
set_error(err, "fcntl(2) failed");//this might throw, so we need to be sure our pipe is safe.
return child();
}
@@ -417,7 +417,7 @@ child executor::invoke(boost::mpl::false_, boost::mpl::false_)
this->pid = ::fork();
if (pid == -1)
{
- _ec = boost::process::detail::get_last_error();
+ _ec = boost::process::v1::detail::get_last_error();
_msg = "fork() failed";
boost::fusion::for_each(seq, call_on_fork_error(*this, _ec));
boost::fusion::for_each(seq, call_on_error(*this, _ec));
@@ -430,7 +430,7 @@ child executor::invoke(boost::mpl::false_, boost::mpl::false_)
boost::fusion::for_each(seq, call_on_exec_setup(*this));
::execve(exe, cmd_line, env);
- _ec = boost::process::detail::get_last_error();
+ _ec = boost::process::v1::detail::get_last_error();
_msg = "execve failed";
boost::fusion::for_each(seq, call_on_exec_error(*this, _ec));
@@ -480,7 +480,7 @@ child executor::invoke(boost::mpl::true_, boost::mpl::true_) //ignore
this->pid = ::vfork();
if (pid == -1)
{
- auto ec = boost::process::detail::get_last_error();
+ auto ec = boost::process::v1::detail::get_last_error();
boost::fusion::for_each(seq, call_on_fork_error(*this, ec));
return child();
}
@@ -488,7 +488,7 @@ child executor::invoke(boost::mpl::true_, boost::mpl::true_) //ignore
{
boost::fusion::for_each(seq, call_on_exec_setup(*this));
::execve(exe, cmd_line, env);
- auto ec = boost::process::detail::get_last_error();
+ auto ec = boost::process::v1::detail::get_last_error();
boost::fusion::for_each(seq, call_on_exec_error(*this, ec));
_exit(EXIT_FAILURE);
}
@@ -516,7 +516,7 @@ child executor::invoke(boost::mpl::false_, boost::mpl::true_)
this->pid = ::vfork();
if (pid == -1)
{
- _ec = boost::process::detail::get_last_error();
+ _ec = boost::process::v1::detail::get_last_error();
_msg = "fork() failed";
boost::fusion::for_each(seq, call_on_fork_error(*this, _ec));
boost::fusion::for_each(seq, call_on_error(*this, _ec));
@@ -529,7 +529,7 @@ child executor::invoke(boost::mpl::false_, boost::mpl::true_)
::execve(exe, cmd_line, env);
- _ec = boost::process::detail::get_last_error();
+ _ec = boost::process::v1::detail::get_last_error();
_msg = "execve failed";
boost::fusion::for_each(seq, call_on_exec_error(*this, _ec));
@@ -568,6 +568,6 @@ inline executor make_executor(Tup & tup)
return executor(tup);
}
-}}}}
+}}}}}
#endif
diff --git a/include/boost/process/v1/detail/posix/fd.hpp b/include/boost/process/v1/detail/posix/fd.hpp
index c17948f04..20216bd73 100644
--- a/include/boost/process/v1/detail/posix/fd.hpp
+++ b/include/boost/process/v1/detail/posix/fd.hpp
@@ -15,10 +15,10 @@
#include
#include
-namespace boost { namespace process { namespace detail { namespace posix {
+namespace boost { namespace process { BOOST_PROCESS_V1_INLINE namespace v1 { namespace detail { namespace posix {
-struct close_fd_ : handler_base_ext, ::boost::process::detail::uses_handles
+struct close_fd_ : handler_base_ext, ::boost::process::v1::detail::uses_handles
{
close_fd_(int fd) : fd_(fd) {}
@@ -26,7 +26,7 @@ struct close_fd_ : handler_base_ext, ::boost::process::detail::uses_handles
void on_exec_setup(PosixExecutor& e) const
{
if (::close(fd_) == -1)
- e.set_error(::boost::process::detail::get_last_error(), "close() failed");
+ e.set_error(::boost::process::v1::detail::get_last_error(), "close() failed");
}
int get_used_handles() {return fd_;}
@@ -37,7 +37,7 @@ struct close_fd_ : handler_base_ext, ::boost::process::detail::uses_handles
};
template
-struct close_fds_ : handler_base_ext, ::boost::process::detail::uses_handles
+struct close_fds_ : handler_base_ext, ::boost::process::v1::detail::uses_handles
{
public:
close_fds_(const Range &fds) : fds_(fds) {}
@@ -48,7 +48,7 @@ struct close_fds_ : handler_base_ext, ::boost::process::detail::uses_handles
for (auto & fd_ : fds_)
if (::close(fd_) == -1)
{
- e.set_error(::boost::process::detail::get_last_error(), "close() failed");
+ e.set_error(::boost::process::v1::detail::get_last_error(), "close() failed");
break;
}
}
@@ -62,7 +62,7 @@ struct close_fds_ : handler_base_ext, ::boost::process::detail::uses_handles
template
-struct bind_fd_ : handler_base_ext, ::boost::process::detail::uses_handles
+struct bind_fd_ : handler_base_ext, ::boost::process::v1::detail::uses_handles
{
public:
bind_fd_(int id, const FileDescriptor &fd) : id_(id), fd_(fd) {}
@@ -71,7 +71,7 @@ struct bind_fd_ : handler_base_ext, ::boost::process::detail::uses_handles
void on_exec_setup(PosixExecutor& e) const
{
if (::dup2(fd_, id_) == -1)
- e.set_error(::boost::process::detail::get_last_error(), "dup2() failed");
+ e.set_error(::boost::process::v1::detail::get_last_error(), "dup2() failed");
}
std::array get_used_handles() {return {id_, fd_};}
@@ -97,6 +97,6 @@ struct fd_
};
-}}}}
+}}}}}
#endif
diff --git a/include/boost/process/v1/detail/posix/file_descriptor.hpp b/include/boost/process/v1/detail/posix/file_descriptor.hpp
index d1f2fad6e..fb4fd7c1c 100644
--- a/include/boost/process/v1/detail/posix/file_descriptor.hpp
+++ b/include/boost/process/v1/detail/posix/file_descriptor.hpp
@@ -11,7 +11,7 @@
#include
#include
-namespace boost { namespace process { namespace detail { namespace posix {
+namespace boost { namespace process { BOOST_PROCESS_V1_INLINE namespace v1 { namespace detail { namespace posix {
struct file_descriptor
{
@@ -24,7 +24,7 @@ struct file_descriptor
file_descriptor() = default;
- explicit file_descriptor(const boost::process::filesystem::path& p, mode_t mode = read_write)
+ explicit file_descriptor(const boost::process::v1::filesystem::path& p, mode_t mode = read_write)
: file_descriptor(p.native(), mode)
{
}
@@ -84,6 +84,6 @@ struct file_descriptor
int _handle = -1;
};
-}}}}
+}}}}}
#endif /* BOOST_PROCESS_DETAIL_WINDOWS_FILE_DESCRIPTOR_HPP_ */
diff --git a/include/boost/process/v1/detail/posix/file_in.hpp b/include/boost/process/v1/detail/posix/file_in.hpp
index 02de57249..b5df08fdf 100644
--- a/include/boost/process/v1/detail/posix/file_in.hpp
+++ b/include/boost/process/v1/detail/posix/file_in.hpp
@@ -17,9 +17,9 @@
#include
#include
-namespace boost { namespace process { namespace detail { namespace posix {
+namespace boost { namespace process { BOOST_PROCESS_V1_INLINE namespace v1 { namespace detail { namespace posix {
-struct file_in : handler_base_ext, ::boost::process::detail::uses_handles
+struct file_in : handler_base_ext, ::boost::process::v1::detail::uses_handles
{
file_descriptor file;
int handle = file.handle();
@@ -37,10 +37,10 @@ struct file_in : handler_base_ext, ::boost::process::detail::uses_handles
void on_exec_setup(WindowsExecutor &e) const
{
if (::dup2(handle, STDIN_FILENO) == -1)
- e.set_error(::boost::process::detail::get_last_error(), "dup2() failed");
+ e.set_error(::boost::process::v1::detail::get_last_error(), "dup2() failed");
}
};
-}}}}
+}}}}}
#endif
diff --git a/include/boost/process/v1/detail/posix/file_out.hpp b/include/boost/process/v1/detail/posix/file_out.hpp
index 282b6b22b..e1a6f3948 100644
--- a/include/boost/process/v1/detail/posix/file_out.hpp
+++ b/include/boost/process/v1/detail/posix/file_out.hpp
@@ -16,10 +16,10 @@
#include
#include
-namespace boost { namespace process { namespace detail { namespace posix {
+namespace boost { namespace process { BOOST_PROCESS_V1_INLINE namespace v1 { namespace detail { namespace posix {
template
-struct file_out : handler_base_ext, ::boost::process::detail::uses_handles
+struct file_out : handler_base_ext, ::boost::process::v1::detail::uses_handles
{
file_descriptor file;
int handle = file.handle();
@@ -45,7 +45,7 @@ template
void file_out<1,-1>::on_exec_setup(Executor &e) const
{
if (::dup2(handle, STDOUT_FILENO) == -1)
- e.set_error(::boost::process::detail::get_last_error(), "dup2() failed");
+ e.set_error(::boost::process::v1::detail::get_last_error(), "dup2() failed");
}
template<>
@@ -53,7 +53,7 @@ template
void file_out<2,-1>::on_exec_setup(Executor &e) const
{
if (::dup2(handle, STDERR_FILENO) == -1)
- e.set_error(::boost::process::detail::get_last_error(), "dup2() failed");
+ e.set_error(::boost::process::v1::detail::get_last_error(), "dup2() failed");
}
template<>
@@ -61,13 +61,13 @@ template
void file_out<1,2>::on_exec_setup(Executor &e) const
{
if (::dup2(handle, STDOUT_FILENO) == -1)
- e.set_error(::boost::process::detail::get_last_error(), "dup2() failed");
+ e.set_error(::boost::process::v1::detail::get_last_error(), "dup2() failed");
if (::dup2(handle, STDERR_FILENO) == -1)
- e.set_error(::boost::process::detail::get_last_error(), "dup2() failed");
+ e.set_error(::boost::process::v1::detail::get_last_error(), "dup2() failed");
}
-}}}}
+}}}}}
#endif
diff --git a/include/boost/process/v1/detail/posix/group_handle.hpp b/include/boost/process/v1/detail/posix/group_handle.hpp
index a98b5bfe2..9de663bd5 100644
--- a/include/boost/process/v1/detail/posix/group_handle.hpp
+++ b/include/boost/process/v1/detail/posix/group_handle.hpp
@@ -11,7 +11,7 @@
#include
#include
-namespace boost { namespace process { namespace detail { namespace posix {
+namespace boost { namespace process { BOOST_PROCESS_V1_INLINE namespace v1 { namespace detail { namespace posix {
struct group_handle
{
@@ -70,7 +70,7 @@ struct group_handle
inline void terminate(group_handle &p, std::error_code &ec) noexcept
{
if (::killpg(p.grp, SIGKILL) == -1)
- ec = boost::process::detail::get_last_error();
+ ec = boost::process::v1::detail::get_last_error();
else
ec.clear();
@@ -81,7 +81,7 @@ inline void terminate(group_handle &p)
{
std::error_code ec;
terminate(p, ec);
- boost::process::detail::throw_error(ec, "killpg(2) failed in terminate");
+ boost::process::v1::detail::throw_error(ec, "killpg(2) failed in terminate");
}
inline bool in_group()
@@ -89,6 +89,6 @@ inline bool in_group()
return true;
}
-}}}}
+}}}}}
#endif /* BOOST_PROCESS_DETAIL_WINDOWS_GROUP_HPP_ */
diff --git a/include/boost/process/v1/detail/posix/group_ref.hpp b/include/boost/process/v1/detail/posix/group_ref.hpp
index caf5f7621..2f4d42e8b 100644
--- a/include/boost/process/v1/detail/posix/group_ref.hpp
+++ b/include/boost/process/v1/detail/posix/group_ref.hpp
@@ -12,7 +12,7 @@
#include
-namespace boost { namespace process {
+namespace boost { namespace process { BOOST_PROCESS_V1_INLINE namespace v1 {
namespace detail { namespace posix {
@@ -46,7 +46,7 @@ struct group_ref : handler_base_ext
};
-}}}}
+}}}}}
#endif /* BOOST_PROCESS_DETAIL_POSIX_GROUP_REF_HPP_ */
diff --git a/include/boost/process/v1/detail/posix/handler.hpp b/include/boost/process/v1/detail/posix/handler.hpp
index 3c455ac04..b1964551d 100644
--- a/include/boost/process/v1/detail/posix/handler.hpp
+++ b/include/boost/process/v1/detail/posix/handler.hpp
@@ -8,7 +8,7 @@
#include
-namespace boost { namespace process { namespace detail { namespace posix {
+namespace boost { namespace process { BOOST_PROCESS_V1_INLINE namespace v1 { namespace detail { namespace posix {
//does not extend anything.
struct handler_base_ext : handler_base
@@ -67,7 +67,7 @@ struct on_exec_error_ : handler_base_ext
Handler handler_;
};
-}}}}
+}}}}}
diff --git a/include/boost/process/v1/detail/posix/handles.hpp b/include/boost/process/v1/detail/posix/handles.hpp
index 1c295cae8..bd1b498e4 100644
--- a/include/boost/process/v1/detail/posix/handles.hpp
+++ b/include/boost/process/v1/detail/posix/handles.hpp
@@ -15,7 +15,7 @@
#include
#include
-namespace boost { namespace process { namespace detail { namespace posix {
+namespace boost { namespace process { BOOST_PROCESS_V1_INLINE namespace v1 { namespace detail { namespace posix {
using native_handle_type = int;
@@ -27,7 +27,7 @@ inline std::vector get_handles(std::error_code & ec)
std::unique_ptr dir{::opendir("/dev/fd"), +[](DIR* p){::closedir(p);}};
if (!dir)
{
- ec = ::boost::process::detail::get_last_error();
+ ec = ::boost::process::v1::detail::get_last_error();
return {};
}
else
@@ -60,7 +60,7 @@ inline std::vector get_handles()
auto res = get_handles(ec);
if (ec)
- boost::process::detail::throw_error(ec, "open_dir(\"/dev/fd\") failed");
+ boost::process::v1::detail::throw_error(ec, "open_dir(\"/dev/fd\") failed");
return res;
}
@@ -72,7 +72,7 @@ inline bool is_stream_handle(native_handle_type handle, std::error_code & ec)
if (::fstat(handle, &stat_) != 0)
{
- ec = ::boost::process::detail::get_last_error();
+ ec = ::boost::process::v1::detail::get_last_error();
}
else
ec.clear();
@@ -90,7 +90,7 @@ inline bool is_stream_handle(native_handle_type handle)
std::error_code ec;
auto res = is_stream_handle(handle, ec);
if (ec)
- boost::process::detail::throw_error(ec, "fstat() failed");
+ boost::process::v1::detail::throw_error(ec, "fstat() failed");
return res;
}
@@ -113,7 +113,7 @@ struct limit_handles_ : handler_base_ext
auto dir = ::opendir("/dev/fd");
if (!dir)
{
- exec.set_error(::boost::process::detail::get_last_error(), "opendir(\"/dev/fd\")");
+ exec.set_error(::boost::process::v1::detail::get_last_error(), "opendir(\"/dev/fd\")");
return;
}
@@ -135,7 +135,7 @@ struct limit_handles_ : handler_base_ext
if (::close(conv) != 0)
{
- exec.set_error(::boost::process::detail::get_last_error(), "close() failed");
+ exec.set_error(::boost::process::v1::detail::get_last_error(), "close() failed");
return;
}
}
@@ -143,6 +143,6 @@ struct limit_handles_ : handler_base_ext
}
};
-}}}}
+}}}}}
#endif //PROCESS_HANDLES_HPP
diff --git a/include/boost/process/v1/detail/posix/io_context_ref.hpp b/include/boost/process/v1/detail/posix/io_context_ref.hpp
index e428133ed..468739ed4 100644
--- a/include/boost/process/v1/detail/posix/io_context_ref.hpp
+++ b/include/boost/process/v1/detail/posix/io_context_ref.hpp
@@ -26,7 +26,7 @@
#include
#include
-namespace boost { namespace process { namespace detail { namespace posix {
+namespace boost { namespace process { BOOST_PROCESS_V1_INLINE namespace v1 { namespace detail { namespace posix {
template
struct on_exit_handler_transformer
@@ -100,7 +100,7 @@ struct io_context_ref : handler_base_ext
{
es->store(val);
for (auto & func : funcs)
- func(::boost::process::detail::posix::eval_exit_status(val), ec);
+ func(::boost::process::v1::detail::posix::eval_exit_status(val), ec);
};
sigchld_service.async_wait(exec.pid, std::move(wh));
@@ -117,9 +117,9 @@ struct io_context_ref : handler_base_ext
private:
boost::asio::io_context &ios;
- boost::process::detail::posix::sigchld_service &sigchld_service = boost::asio::use_service(ios);
+ boost::process::v1::detail::posix::sigchld_service &sigchld_service = boost::asio::use_service(ios);
};
-}}}}
+}}}}}
#endif /* BOOST_PROCESS_WINDOWS_IO_CONTEXT_REF_HPP_ */
diff --git a/include/boost/process/v1/detail/posix/is_running.hpp b/include/boost/process/v1/detail/posix/is_running.hpp
index 11513a4ed..133ad9c06 100644
--- a/include/boost/process/v1/detail/posix/is_running.hpp
+++ b/include/boost/process/v1/detail/posix/is_running.hpp
@@ -11,7 +11,7 @@
#include
#include
-namespace boost { namespace process { namespace detail { namespace posix {
+namespace boost { namespace process { BOOST_PROCESS_V1_INLINE namespace v1 { namespace detail { namespace posix {
// Use the "stopped" state (WIFSTOPPED) to indicate "not terminated".
// This bit arrangement of status codes is not guaranteed by POSIX, but (according to comments in
@@ -35,7 +35,7 @@ inline bool is_running(const child_handle &p, int & exit_code, std::error_code &
if (ret == -1)
{
if (errno != ECHILD) //because it no child is running, then this one isn't either, obviously.
- ec = ::boost::process::detail::get_last_error();
+ ec = ::boost::process::v1::detail::get_last_error();
return false;
}
else if (ret == 0)
@@ -55,7 +55,7 @@ inline bool is_running(const child_handle &p, int & exit_code)
{
std::error_code ec;
bool b = is_running(p, exit_code, ec);
- boost::process::detail::throw_error(ec, "waitpid(2) failed in is_running");
+ boost::process::v1::detail::throw_error(ec, "waitpid(2) failed in is_running");
return b;
}
@@ -75,6 +75,6 @@ inline int eval_exit_status(int code)
}
}
-}}}}
+}}}}}
#endif
diff --git a/include/boost/process/v1/detail/posix/null_in.hpp b/include/boost/process/v1/detail/posix/null_in.hpp
index c0f86c347..5719512fc 100644
--- a/include/boost/process/v1/detail/posix/null_in.hpp
+++ b/include/boost/process/v1/detail/posix/null_in.hpp
@@ -17,9 +17,9 @@
#include
#include
-namespace boost { namespace process { namespace detail { namespace posix {
+namespace boost { namespace process { BOOST_PROCESS_V1_INLINE namespace v1 { namespace detail { namespace posix {
-struct null_in : handler_base_ext, ::boost::process::detail::uses_handles
+struct null_in : handler_base_ext, ::boost::process::v1::detail::uses_handles
{
file_descriptor source{"/dev/null", file_descriptor::read};
@@ -34,10 +34,10 @@ struct null_in : handler_base_ext, ::boost::process::detail::uses_handles
void on_exec_setup(Executor &e) const
{
if (::dup2(source.handle(), STDIN_FILENO) == -1)
- e.set_error(::boost::process::detail::get_last_error(), "dup2() failed");
+ e.set_error(::boost::process::v1::detail::get_last_error(), "dup2() failed");
}
};
-}}}}
+}}}}}
#endif
diff --git a/include/boost/process/v1/detail/posix/null_out.hpp b/include/boost/process/v1/detail/posix/null_out.hpp
index 0860aaee8..6deb72a21 100644
--- a/include/boost/process/v1/detail/posix/null_out.hpp
+++ b/include/boost/process/v1/detail/posix/null_out.hpp
@@ -17,10 +17,10 @@
#include
#include
-namespace boost { namespace process { namespace detail { namespace posix {
+namespace boost { namespace process { BOOST_PROCESS_V1_INLINE namespace v1 { namespace detail { namespace posix {
template
-struct null_out : handler_base_ext, ::boost::process::detail::uses_handles
+struct null_out : handler_base_ext, ::boost::process::v1::detail::uses_handles
{
file_descriptor sink{"/dev/null", file_descriptor::write};
@@ -41,7 +41,7 @@ template
void null_out<1,-1>::on_exec_setup(Executor &e) const
{
if (::dup2(sink.handle(), STDOUT_FILENO) == -1)
- e.set_error(::boost::process::detail::get_last_error(), "dup2() failed");
+ e.set_error(::boost::process::v1::detail::get_last_error(), "dup2() failed");
}
template<>
@@ -49,7 +49,7 @@ template
void null_out<2,-1>::on_exec_setup(Executor &e) const
{
if (::dup2(sink.handle(), STDERR_FILENO) == -1)
- e.set_error(::boost::process::detail::get_last_error(), "dup2() failed");
+ e.set_error(::boost::process::v1::detail::get_last_error(), "dup2() failed");
}
template<>
@@ -57,12 +57,12 @@ template
void null_out<1,2>::on_exec_setup(Executor &e) const
{
if (::dup2(sink.handle(), STDOUT_FILENO) == -1)
- e.set_error(::boost::process::detail::get_last_error(), "dup2() failed");
+ e.set_error(::boost::process::v1::detail::get_last_error(), "dup2() failed");
if (::dup2(sink.handle(), STDERR_FILENO) == -1)
- e.set_error(::boost::process::detail::get_last_error(), "dup2() failed");
+ e.set_error(::boost::process::v1::detail::get_last_error(), "dup2() failed");
}
-}}}}
+}}}}}
#endif
diff --git a/include/boost/process/v1/detail/posix/on_exit.hpp b/include/boost/process/v1/detail/posix/on_exit.hpp
index 5863a6402..b61a18547 100644
--- a/include/boost/process/v1/detail/posix/on_exit.hpp
+++ b/include/boost/process/v1/detail/posix/on_exit.hpp
@@ -14,14 +14,14 @@
#include
#include
-namespace boost { namespace process { namespace detail {
+namespace boost { namespace process { BOOST_PROCESS_V1_INLINE namespace v1 { namespace detail {
template
inline asio::io_context& get_io_context(const Tuple & tup);
namespace posix {
-struct on_exit_ : boost::process::detail::posix::async_handler
+struct on_exit_ : boost::process::v1::detail::posix::async_handler
{
std::function handler;
on_exit_(const std::function & handler) : handler(handler)
@@ -31,7 +31,7 @@ struct on_exit_ : boost::process::detail::posix::async_handler
template
std::function