[RFC,v4,0/9] libcamera: process: Remove `ProcessManager` singleton
mbox series

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

Message

Barnabás Pőcze April 24, 2025, 11:21 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 v4:
  * address review comments

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 (9):
  libcamera: process: Disable copy/move
  libcamera: process: Misc. cleanup around `execv()`
  libcamera: process: Use `pid_` member to decide if running
  libcamera: process: Return error if already running
  libcamera: process: Ensure that file descriptors are nonnegative
  libcamera: process: Use span instead of vector
  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        |  45 +--
 meson.build                                 |   6 +-
 src/libcamera/ipc_pipe_unixsocket.cpp       |   9 +-
 src/libcamera/process.cpp                   | 313 +++++++-------------
 test/ipc/unixsocket_ipc.cpp                 |   2 -
 test/log/log_process.cpp                    |   2 -
 test/process/process_test.cpp               |   7 +-
 8 files changed, 125 insertions(+), 260 deletions(-)

--
2.49.0