mirror of
https://git.libcamera.org/libcamera/libcamera.git
synced 2025-07-24 17:15:07 +03:00
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:
parent
f4933ee77f
commit
dfa86000a6
1 changed files with 1 additions and 1 deletions
|
@ -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");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue