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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user