[RFC PATCH v3 1/9] libcamera: process: Disable copy/move
Laurent Pinchart
laurent.pinchart at ideasonboard.com
Wed Mar 26 13:52:04 CET 2025
Hi Barnabás,
Thank you for the patch.
On Tue, Mar 25, 2025 at 07:08:13PM +0100, Barnabás Pőcze wrote:
> 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
You should include libcamera/base/class.h.
Reviewed-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
> @@ -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);
--
Regards,
Laurent Pinchart
More information about the libcamera-devel
mailing list