py: Set EFD_CLOEXEC on eventfd to avoid fd leaking
Set EFD_CLOEXEC on eventfd to avoid fd leaking. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
committed by
Laurent Pinchart
parent
f4933ee77f
commit
dfa86000a6
@@ -24,7 +24,7 @@ PyCameraManager::PyCameraManager()
|
||||
|
||||
cameraManager_ = std::make_unique<CameraManager>();
|
||||
|
||||
int fd = eventfd(0, 0);
|
||||
int fd = eventfd(0, EFD_CLOEXEC);
|
||||
if (fd == -1)
|
||||
throw std::system_error(errno, std::generic_category(),
|
||||
"Failed to create eventfd");
|
||||
|
||||
Reference in New Issue
Block a user