|
process-cpp
3.0.0
A simple convenience library for handling processes in C++11.
|
Classes | |
| class | CrossProcessSync |
| A cross-process synchronization primitive that supports simple wait-condition-like scenarios. More... | |
Enumerations | |
| enum | ForkAndRunResult { ForkAndRunResult::empty = 0, ForkAndRunResult::client_failed = 1 << 0, ForkAndRunResult::service_failed = 1 << 1 } |
| The ForkAndRunResult enum models the different failure modes of fork_and_run. More... | |
Functions | |
| CORE_POSIX_DLL_PUBLIC ForkAndRunResult | operator| (ForkAndRunResult lhs, ForkAndRunResult rhs) |
| CORE_POSIX_DLL_PUBLIC ForkAndRunResult | operator& (ForkAndRunResult lhs, ForkAndRunResult rhs) |
| CORE_POSIX_DLL_PUBLIC ForkAndRunResult | fork_and_run (const std::function< core::posix::exit::Status()> &service, const std::function< core::posix::exit::Status()> &client) |
| Forks two processes for both the service and the client. More... | |
|
strong |
The ForkAndRunResult enum models the different failure modes of fork_and_run.
| Enumerator | |
|---|---|
| empty | Special value indicating no bit being set. |
| client_failed | The client failed. |
| service_failed | The service failed. |
Definition at line 34 of file fork_and_run.h.
| core::testing::ForkAndRunResult core::testing::fork_and_run | ( | const std::function< core::posix::exit::Status()> & | service, |
| const std::function< core::posix::exit::Status()> & | client | ||
| ) |
Forks two processes for both the service and the client.
The function does the following:
| std::system_error | if an error occured during process interaction. |
| std::runtime_error | for signalling all other error conditions. |
| [in] | service | The service to be executed in a child process. |
| [in] | client | The client to be executed in a child process. |
Definition at line 41 of file fork_and_run.cpp.
References empty, core::posix::wait::Result::exited, core::posix::fork(), and core::posix::exit::success.
Referenced by TEST().
Here is the call graph for this function:| core::testing::ForkAndRunResult core::testing::operator& | ( | ForkAndRunResult | lhs, |
| ForkAndRunResult | rhs | ||
| ) |
Definition at line 33 of file fork_and_run.cpp.
| core::testing::ForkAndRunResult core::testing::operator| | ( | ForkAndRunResult | lhs, |
| ForkAndRunResult | rhs | ||
| ) |
Definition at line 25 of file fork_and_run.cpp.