[RFC PATCH v3 1/9] libcamera: process: Disable copy/move

Barnabás Pőcze barnabas.pocze at ideasonboard.com
Tue Mar 25 19:08:13 CET 2025


A `Process` object has address identity because a pointer
to it is stored inside the `ProcessManager`. However, copy/move
special methods are still generated by the compiler. So disable
them to avoid potential issues and confusion.

Signed-off-by: Barnabás Pőcze <barnabas.pocze at ideasonboard.com>
---
 include/libcamera/internal/process.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/libcamera/internal/process.h b/include/libcamera/internal/process.h
index b1d07a5a5..58e3e41ce 100644
--- a/include/libcamera/internal/process.h
+++ b/include/libcamera/internal/process.h
@@ -42,6 +42,8 @@ public:
 	Signal<enum ExitStatus, int> finished;
 
 private:
+	LIBCAMERA_DISABLE_COPY_AND_MOVE(Process)
+
 	void closeAllFdsExcept(const std::vector<int> &fds);
 	int isolate();
 	void died(int wstatus);
-- 
2.49.0



More information about the libcamera-devel mailing list