![]() |
Home | Libraries | People | FAQ | More |
boost::process::v2::basic_process_handle
// In header: <boost/process/v2/process_handle.hpp> template<typename Executor> struct basic_process_handle { // types typedef ; typedef ; // The executor_type of the process_handle. // member classes/structs/unions // Rebinds the process_handle to another executor. template<typename Executor1> struct rebind_executor { // types typedef basic_process_handle< ; // The socket type when rebound to the specified executor. }; // construct/copy/destruct template<typename ExecutionContext> (); (); (, ); (, , ); template<typename Executor1> (basic_process_handle< ); // public member functions (); () ; (); (); (, ); (); (); (); (); (); (); (, ); (); () ; template< DEFAULT_TYPE> (); // public data members ec; };
A process handle is an unmanaged version of a process. This means it does not terminate the proces on destruction and will not keep track of the exit-code.
Note that the exit code might be discovered early, during a call to running
. Thus it can only be discovered that process has exited already.
basic_process_handle
public
construct/copy/destructtemplate<typename ExecutionContext> ( context);Construct a
basic_process_handle
from an execution_context.
Template Parameters: |
|
( executor);Construct an empty process_handle from an executor.
( executor, pid);Construct an empty process_handle from an executor and bind it to a pid.
On NON-linux posix systems this call is not able to obtain a file-descriptor and will thus rely on signals.
( executor, pid, process_handle);Construct an empty process_handle from an executor and bind it to a pid and the native-handle.
On some non-linux posix systems this overload is not present.
template<typename Executor1> (basic_process_handle< handle);Move construct and rebind the executor.
basic_process_handle
public member functions();Getter for the executor.
() ;Get the id of the process.
();Terminate the process if it's still running and ignore the result.
();
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
( exit_status, ec);wait for the process to exit and store the exit code in exit_status.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
( exit_status);
( ec);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);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.
();Unconditionally terminates the process and stores the exit code in exit_status.
( exit_status);
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
( exit_code, ec);Checks if the current process is running.
If it has already completed, it assigns the exit code to exit_code
.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
( exit_code);
() ;Check if the process handle is referring to an existing process.
template< DEFAULT_TYPE> ( DEFAULT);Asynchronously wait for the process to exit and deliver the native exit-code in the completion handler.