summaryrefslogtreecommitdiff
path: root/src/libcamera/process.cpp
AgeCommit message (Collapse)Author
2019-08-22libcamera: process: Properly ignore unused result with gccLaurent Pinchart
Casting the return value of a function to (void) doesn't ignore the unused result warning with gcc. Use a #pragma to fix this properly, to fix compilation with _FORTIFY_SOURCE. Fixes: df23ab95f3d7 ("libcamera: process: fix compilation on Chromium OS") Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
2019-07-31libcamera: process: Fail loudly on isolateJacopo Mondi
Add an error debug message when disassociating part of a process execution context using unshare fails. As this is currently used to isolate a child process which is immediately terminated silently if unshare fails, add a debug printout and propagate up the error code to make the failure more visible. Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
2019-07-12libcamera: process: fix error checkingPaul Elder
The return value of a read() call is mistakenly checked for nonzero rather than less than zero. Fix this. Fixes: df23ab95f3d7 ("libcamera: process: fix compilation on Chromium OS") Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
2019-07-12libcamera: process: fix compilation on Chromium OSPaul Elder
Commit 3d20beca6616 ("libcamera: Add Process and ProcessManager classes") causes the build to fail in the Chromium OS build environment, because the return values of some function calls marked with the __warn_unused_result__ attribute are ignored. Fix this. Fixes: 3d20beca6616 ("libcamera: Add Process and ProcessManager classes") Signed-off-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2019-07-12libcamera: Add Process and ProcessManager classesPaul Elder
Add a Process class to abstract a process, and a ProcessManager singleton to monitor and manage the processes. Signed-off-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>