[v6,0/6] libcamera: process: Remove `ProcessManager` singleton
mbox series

Message ID 20250728113641.238256-1-barnabas.pocze@ideasonboard.com
Headers show
Series
  • libcamera: process: Remove `ProcessManager` singleton
Related show

Message

Barnabás Pőcze July 28, 2025, 11:36 a.m. UTC
The main goal is to remove the need for the ProcessManager singleton. That
is achieved by using pidfd + clone3(), which raises the minimum
kernel version to 5.4. There are also additional misc. changes.
---
changes in v6:
  * first couple patches merged
  * rebase

changes in v5:
  * send the actually intended version...

changes in v4:
  * address review comments

v5: https://patchwork.libcamera.org/cover/23252/
v4: https://patchwork.libcamera.org/cover/23242/
v3: https://patchwork.libcamera.org/cover/23013/
v2: https://patchwork.libcamera.org/patch/22609/
v1: https://patchwork.libcamera.org/patch/22522/


Barnabás Pőcze (6):
  libcamera: process: Use `pid_` member to decide if running
  libcamera: process: start(): Use span instead of vector
  libcamera: process: closeAllFdsExcept(): Take vector by value
  libcamera: process: Move `closeAllFdsExcept()`
  libcamera: process: Use `close_range()` when available
  libcamera: process: Remove `ProcessManager` singleton

 include/libcamera/internal/camera_manager.h |   1 -
 include/libcamera/internal/process.h        |  42 +--
 meson.build                                 |   6 +-
 src/libcamera/ipc_pipe_unixsocket.cpp       |   9 +-
 src/libcamera/process.cpp                   | 304 +++++++-------------
 test/ipc/unixsocket_ipc.cpp                 |   2 -
 test/log/log_process.cpp                    |   2 -
 test/process/process_test.cpp               |   7 +-
 8 files changed, 113 insertions(+), 260 deletions(-)

--
2.50.1