libcamera
v0.3.2+116-83c5ad0f
Supporting cameras in Linux since 2019
|
Manager of processes. More...
Public Member Functions | |
ProcessManager () | |
Construct a ProcessManager instance. More... | |
void | registerProcess (Process *proc) |
Register process with process manager. More... | |
int | writePipe () const |
Retrieve the Process manager's write pipe. More... | |
const struct sigaction & | oldsa () const |
Retrive the old signal action data. More... | |
Static Public Member Functions | |
static ProcessManager * | instance () |
Retrieve the Process manager instance. More... | |
Manager of processes.
The ProcessManager singleton keeps track of all created Process instances, and manages the signal handling involved in terminating processes.
libcamera::ProcessManager::ProcessManager | ( | ) |
Construct a ProcessManager instance.
The ProcessManager class is meant to only be instantiated once, by the CameraManager.
|
static |
Retrieve the Process manager instance.
The ProcessManager is constructed by the CameraManager. This function shall be used to retrieve the single instance of the manager.
const struct sigaction & libcamera::ProcessManager::oldsa | ( | ) | const |
Retrive the old signal action data.
This function is meant only to be used by the static signal handler.
void libcamera::ProcessManager::registerProcess | ( | Process * | proc | ) |
Register process with process manager.
[in] | proc | Process to register |
This function registers the proc with the process manager. It shall be called by the parent process after successfully forking, in order to let the parent signal process termination.
int libcamera::ProcessManager::writePipe | ( | ) | const |
Retrieve the Process manager's write pipe.
This function is meant only to be used by the static signal handler.