libcamera: process: Use pid_ member to decide if running
Instead of using a separate member variable, use `pid_ > 0` to determine if the process is still running. Previously the value of `pid_` was not reset to -1 when the process terminated, but since it is only meaningful while the process is running, reset it to -1 in `Process::died()`. Neither `pid_` nor `running_` are exposed, so this change has no effect on the public interface or observable behaviour. Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
@@ -50,7 +50,6 @@ private:
|
||||
void died(int wstatus);
|
||||
|
||||
pid_t pid_;
|
||||
bool running_;
|
||||
enum ExitStatus exitStatus_;
|
||||
int exitCode_;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user