From 1ce7b6df24461cb1214bc3a6d197afa3e3e74bc3 Mon Sep 17 00:00:00 2001 From: Alan Griffiths Date: Wed, 14 Aug 2024 14:24:03 +0100 Subject: [PATCH] inotify_init1(IN_CLOEXEC) --- src/miral/static_display_config.cpp | 2 +- src/server/frontend_wayland/foreign_toplevel_manager_v1.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/miral/static_display_config.cpp b/src/miral/static_display_config.cpp index a9d50de96ed..7812aae4d93 100644 --- a/src/miral/static_display_config.cpp +++ b/src/miral/static_display_config.cpp @@ -627,7 +627,7 @@ auto miral::ReloadingYamlFileDisplayConfig::inotify_config_path() -> std::option if (!config_path_) return std::nullopt; - mir::Fd inotify_fd{inotify_init()}; + mir::Fd inotify_fd{inotify_init1(IN_CLOEXEC)}; if (inotify_fd < 0) BOOST_THROW_EXCEPTION((std::system_error{errno, std::system_category(), "Failed to initialize inotify_fd"})); diff --git a/src/server/frontend_wayland/foreign_toplevel_manager_v1.cpp b/src/server/frontend_wayland/foreign_toplevel_manager_v1.cpp index babf70c638c..22c502c6af8 100644 --- a/src/server/frontend_wayland/foreign_toplevel_manager_v1.cpp +++ b/src/server/frontend_wayland/foreign_toplevel_manager_v1.cpp @@ -501,7 +501,7 @@ void mf::ForeignSurfaceObserver::application_id_set_to( // GDesktopFileCache mf::GDesktopFileCache::GDesktopFileCache(const std::shared_ptr &main_loop) : main_loop{main_loop}, - inotify_fd{inotify_init()} + inotify_fd{inotify_init1(IN_CLOEXEC)} { refresh_app_cache();