diff options
author | Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> | 2022-08-19 14:16:13 +0300 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2022-08-19 15:44:24 +0300 |
commit | dfa86000a63f8d94399a28e5432e445239526389 (patch) | |
tree | 243c10213189f87d7fb2854e7525477b3efa1958 /src/py | |
parent | f4933ee77f40b4861f2dd513b913065ac1bad96f (diff) |
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>
Diffstat (limited to 'src/py')
-rw-r--r-- | src/py/libcamera/py_camera_manager.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/py/libcamera/py_camera_manager.cpp b/src/py/libcamera/py_camera_manager.cpp index 18fdb623..8bfb8e57 100644 --- a/src/py/libcamera/py_camera_manager.cpp +++ b/src/py/libcamera/py_camera_manager.cpp @@ -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"); |