libcamera  v0.3.1+12-19bbca3c
Supporting cameras in Linux since 2019
Public Member Functions | Static Public Member Functions | List of all members
libcamera::ProcessManager Class Reference

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 ProcessManagerinstance ()
 Retrieve the Process manager instance. More...
 

Detailed Description

Manager of processes.

The ProcessManager singleton keeps track of all created Process instances, and manages the signal handling involved in terminating processes.

Constructor & Destructor Documentation

◆ ProcessManager()

libcamera::ProcessManager::ProcessManager ( )

Construct a ProcessManager instance.

The ProcessManager class is meant to only be instantiated once, by the CameraManager.

Member Function Documentation

◆ instance()

ProcessManager * libcamera::ProcessManager::instance ( )
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.

Returns
The Process manager instance

◆ oldsa()

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.

Returns
The old signal action data

◆ registerProcess()

void libcamera::ProcessManager::registerProcess ( Process proc)

Register process with process manager.

Parameters
[in]procProcess 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.

◆ writePipe()

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.

Returns
Pipe for writing

The documentation for this class was generated from the following files: