![]() |
Home | Libraries | People | FAQ | More |
boost::process::v2::basic_process — A class managing a subprocess.
// In header: <boost/process/v2/process.hpp> template<typename Executor> struct basic_process { // types typedef ; // The executor of the process. typedef basic_process_handle< ; // The non-closing handle type. typedef ; // Provides access to underlying operating system facilities. // member classes/structs/unions struct async_wait_op_ { // public member functions template<typename Self> (); template<typename Self> (, , ); // public data members basic_process_handle< handle; res; }; // Rebinds the process_handle to another executor. template<typename Executor1> struct rebind_executor { // types typedef basic_process< ; // The socket type when rebound to the specified executor. }; // construct/copy/destruct () = ; (basic_process &) = ; (basic_process &&) = ; template<typename Executor1> (basic_process< ); template< Inits> (, , , ); template<typename Args, Inits> (, , , ); template<typename ExecutionContext, Inits> (, , , ); template<typename ExecutionContext, typename Args, Inits> (, , , ); (, ); (, , ); (); template<typename ExecutionContext> (, , = ); template<typename ExecutionContext> (, , , = ); template<typename ExecutionContext> (, = ); basic_process & (basic_process &) = ; basic_process & (basic_process &&) = ; ~(); // public member functions (); (); () ; (); (); (); (); (); (); (); (); (); (); (); (); (); (); () ; () ; () ; (); () ; () ; template< DEFAULT_TYPE> (); };
basic_process
public
construct/copy/destruct() = ;
An empty process is similar to a default constructed thread. It holds an empty handle and is a place holder for a process that is to be launched later.
(basic_process &) = ;
(basic_process && lhs) = ;Move construct the process. It will be detached from
lhs
. template<typename Executor1> (basic_process< lhs);Move construct and rebind the executor.
template< Inits> ( executor, exe, args, inits);Construct a child from a property list and launch it using the default launcher..
template<typename Args, Inits> ( executor, exe, args, inits);Construct a child from a property list and launch it using the default launcher..
template<typename ExecutionContext, Inits> ( context, exe, args, inits);Construct a child from a property list and launch it using the default launcher..
template<typename ExecutionContext, typename Args, Inits> ( context, exe, args, inits);Construct a child from a property list and launch it using the default launcher.
( exec, pid);Attach to an existing process.
( exec, pid, native_handle);Attach to an existing process and the internal handle.
( exec);Create an invalid handle.
template<typename ExecutionContext> ( context, pid, = );Attach to an existing process.
template<typename ExecutionContext> ( context, pid, native_handle, = );Attach to an existing process and the internal handle.
template<typename ExecutionContext> ( context, = );Create an invalid handle.
basic_process & (basic_process &) = ;
basic_process & (basic_process && lhs) = ;Move assign a process. It will be detached from
lhs
. ~();Destruct the handle and terminate the process if it wasn't detached.
basic_process
public member functions();Get the executor of the process.
();Get the underlying non-closing handle.
() ;Get the underlying non-closing handle.
();Sends the process a signal to ask for an interrupt, which the process may interpret as a shutdown.
Maybe be ignored by the subprocess.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
( ec);
();
( ec);Sends the process a signal to ask for a graceful shutdown. Maybe be ignored by the subprocess.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
( ec);Send the process a signal requesting it to stop. This may rely on undocumented functions.
();Send the process a signal requesting it to stop. This may rely on undocumented functions.
( ec);Send the process a signal requesting it to resume. This may rely on undocumented functions.
();Send the process a signal requesting it to resume. This may rely on undocumented functions.
();
( ec);Unconditionally terminates the process and stores the exit code in exit_status.
();
( ec);Waits for the process to exit, store the exit code internally and return it.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
();Detach the process.
();Get the native.
() ;Return the evaluated exit_code.
() ;Get the id of the process;.
() ;The native handle of the process.
This might be undefined on posix systems that only support signals
();Checks if the current process is running.
If it has already completed the exit code will be stored internally and can be obtained by calling `exit_code.
( ec) ;
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
() ;Check if the process is referring to an existing process.
Note that this might be a process that already exited.
template< DEFAULT_TYPE> ( DEFAULT);Asynchronously wait for the process to exit and deliver the native exit-code in the completion handler.