From 1469d5e26e27bf5fe4d065a6f3c87edd804f2888 Mon Sep 17 00:00:00 2001 From: Paul Elder Date: Wed, 26 Aug 2020 17:26:47 +0900 Subject: libcamera: ProcessManager: make ProcessManager lifetime explicitly managed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If any Process instances are destroyed after the ProcessManager is destroyed, then a segfault will occur. Fix this by making the lifetime of the ProcessManager explicit, and make the CameraManager construct and deconstruct (automatically, via a member variable) the ProcessManager. Update the tests accordingly. Signed-off-by: Paul Elder Reviewed-by: Laurent Pinchart Reviewed-by: Niklas Söderlund Reviewed-by: Jacopo Mondi --- test/log/log_process.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'test/log') diff --git a/test/log/log_process.cpp b/test/log/log_process.cpp index b024f002..2a826222 100644 --- a/test/log/log_process.cpp +++ b/test/log/log_process.cpp @@ -132,6 +132,8 @@ private: exitCode_ = exitCode; } + ProcessManager processManager_; + Process proc_; Process::ExitStatus exitStatus_; string logPath_; -- cgit v1.2.1