libcamera: ProcessManager: make ProcessManager lifetime explicitly managed
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 <paul.elder@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
This commit is contained in:
parent
7e59bccb35
commit
1469d5e26e
5 changed files with 54 additions and 27 deletions
|
@ -132,6 +132,8 @@ private:
|
|||
exitCode_ = exitCode;
|
||||
}
|
||||
|
||||
ProcessManager processManager_;
|
||||
|
||||
Process proc_;
|
||||
Process::ExitStatus exitStatus_;
|
||||
string logPath_;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue