diff options
author | Barnabás Pőcze <barnabas.pocze@ideasonboard.com> | 2025-03-25 18:02:59 +0100 |
---|---|---|
committer | Barnabás Pőcze <barnabas.pocze@ideasonboard.com> | 2025-06-09 15:25:59 +0200 |
commit | fae2b506d7ce8df6149e1eedf147cb35838fbb16 (patch) | |
tree | 0f356b5691125f23acfe8ca0de0f48df2d133f3f | |
parent | 0a591eaf8c36ffd34dc0d69e6221c4fe88fd4a73 (diff) |
libcamera: process: Return error if already running
Returning 0 when a running process is already managed can be confusing
since the parameters might be completely different, causing the caller
to mistakenly assume that the program it specified has been started.
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>
-rw-r--r-- | src/libcamera/process.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libcamera/process.cpp b/src/libcamera/process.cpp index f4e4b004..edbe8664 100644 --- a/src/libcamera/process.cpp +++ b/src/libcamera/process.cpp @@ -241,7 +241,7 @@ int Process::start(const std::string &path, int ret; if (running_) - return 0; + return -EBUSY; int childPid = fork(); if (childPid == -1) { |