libcamera: process: Manage pipe fds by UniqueFD

Manages the file descriptors owned by Process for pipe by UniqueFDs.

Signed-off-by: Hirokazu Honda <hiroh@chromium.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
Hirokazu Honda
2021-12-04 23:05:03 +02:00
committed by Laurent Pinchart
parent bf26505dc8
commit c49e888848
2 changed files with 13 additions and 7 deletions
+3 -1
View File
@@ -12,6 +12,7 @@
#include <vector>
#include <libcamera/base/signal.h>
#include <libcamera/base/unique_fd.h>
namespace libcamera {
@@ -75,8 +76,9 @@ private:
std::list<Process *> processes_;
struct sigaction oldsa_;
EventNotifier *sigEvent_;
int pipe_[2];
UniqueFD pipe_[2];
};
} /* namespace libcamera */