process-cpp
3.0.0
A simple convenience library for handling processes in C++11.
|
The Process class models a process and possible operations on it. More...
#include <process.h>
Classes | |
struct | Private |
Public Member Functions | |
Process (pid_t pid) | |
Creates a process instance wrapping an existing process. More... | |
virtual | ~Process () noexcept |
Frees resources associated with the process. More... | |
virtual pid_t | pid () const |
Query the pid of the process. More... | |
virtual ProcessGroup | process_group_or_throw () const |
Queries the id of the process group this process belongs to. More... | |
virtual ProcessGroup | process_group (std::error_code &se) const noexcept(true) |
Queries the id of the process group this process belongs to. More... | |
![]() | |
virtual void | send_signal_or_throw (Signal signal) |
Sends a signal to this signalable object. More... | |
virtual void | send_signal (Signal signal, std::error_code &e) noexcept(true) |
Sends a signal to this signalable object. More... | |
Static Public Member Functions | |
static Process | invalid () |
Returns an invalid instance for testing purposes. More... | |
Additional Inherited Members | |
![]() | |
CORE_POSIX_DLL_LOCAL | Signalable (pid_t pid) |
The Process class models a process and possible operations on it.
The process class is implicitly shared.
|
explicit |
Creates a process instance wrapping an existing process.
Throw | std::system_error if pid is invalid, i.e., pid < 0. |
pid | The process identifier of the existing process. |
Definition at line 47 of file process.cpp.
References pid().
|
virtualnoexcept |
Frees resources associated with the process.
Definition at line 55 of file process.cpp.
|
static |
Returns an invalid instance for testing purposes.
Definition at line 38 of file process.cpp.
Referenced by TEST().
|
virtual |
Query the pid of the process.
Definition at line 59 of file process.cpp.
Referenced by core::posix::linux::proc::process::operator<<(), core::posix::linux::proc::process::operator>>(), Process(), process_group(), process_group_or_throw(), and TEST().
|
virtualnoexcept |
Queries the id of the process group this process belongs to.
Definition at line 74 of file process.cpp.
References pid().
Referenced by TEST().
|
virtual |
Queries the id of the process group this process belongs to.
std::system_error | in case of errors. |
Definition at line 64 of file process.cpp.
References pid().