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:
Barnabás Pőcze
2025-03-24 17:17:52 +01:00
parent b0db9388f6
commit 5de79e93f0
2 changed files with 3 additions and 6 deletions
-1
View File
@@ -50,7 +50,6 @@ private:
void died(int wstatus);
pid_t pid_;
bool running_;
enum ExitStatus exitStatus_;
int exitCode_;