|
JH-Toolkit v1.4.1
An engineering-oriented C++20 toolkit with duck-typed concepts, static design, async coroutines, and semantic containers — header-only, RTTI-free, and concurrency-friendly.
|
Cross-platform process launcher. More...
#include <jh/synchronous/ipc/process_launcher.h>
Classes | |
| struct | handle |
| Process handle representing a single launched instance. More... | |
Public Member Functions | |
| process_launcher ()=delete | |
| Not constructible. | |
| process_launcher (const process_launcher &)=delete | |
| Not copyable. | |
| process_launcher & | operator= (const process_launcher &)=delete |
| Not assignable. | |
Static Public Member Functions | |
| static handle | start () |
| Launch the target process. | |
Cross-platform process launcher.
| Path | Executable path (compile-time string literal). Must be a relative path following POSIX rules:
|
| IsBinary | Distinguishes binary executables from scripts (Windows only).
|
"./" or mid-path ".." segments are forbidden. "/foo/bar") are forbidden. JH_INTERPROCESS_ALLOW_PARENT_PATH): ".." usage is invalid. "../" prefixes are allowed, but the path cannot consist only of them. cwd. '/') are translated automatically, backslashes are unnecessary. Each instantiation corresponds to a specific executable determined at compile time. The type is unique per string literal and parameter combination.
|
inlinestatic |
Launch the target process.
On success, returns a handle which must be explicitly wait()-ed.
| std::runtime_error | if process creation fails. |