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>
This commit is contained in:
parent
0a591eaf8c
commit
fae2b506d7
1 changed files with 1 additions and 1 deletions
|
@ -241,7 +241,7 @@ int Process::start(const std::string &path,
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
if (running_)
|
if (running_)
|
||||||
return 0;
|
return -EBUSY;
|
||||||
|
|
||||||
int childPid = fork();
|
int childPid = fork();
|
||||||
if (childPid == -1) {
|
if (childPid == -1) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue