libcamera: libcamera::ProcessManager Class Reference

libcamera v0.0.4 Supporting cameras in Linux since 2019

Loading...
Searching...
No Matches
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.
void | registerProcess (Process *proc)
| Register process with process manager.
int | writePipe () const
| Retrieve the Process manager's write pipe.
const struct sigaction & | oldsa () const
| Retrive the old signal action data.

## Static Public Member Functions
static ProcessManager * | instance ()
| Retrieve the Process manager instance.

## 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] | 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.

## ◆ 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:

- include/libcamera/internal/process.h
- src/libcamera/process.cpp