From 83a334f97df4389ca30cb63e50317a66a82562b9 Mon Sep 17 00:00:00 2001 From: Vaxry <43317083+vaxerski@users.noreply.github.com> Date: Thu, 8 Aug 2024 10:54:41 +0100 Subject: core: Move to C++26 and use native_handle to CLOEXEC the debug fd (#7219) Requires GCC >= 14 / Clang >= 18 --------- Co-authored-by: Mihai Fufezan --- src/debug/Log.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/debug/Log.cpp') diff --git a/src/debug/Log.cpp b/src/debug/Log.cpp index 0def77c0..a4c5b08e 100644 --- a/src/debug/Log.cpp +++ b/src/debug/Log.cpp @@ -5,10 +5,13 @@ #include #include +#include void Debug::init(const std::string& IS) { logFile = IS + (ISDEBUG ? "/hyprlandd.log" : "/hyprland.log"); logOfs.open(logFile, std::ios::out | std::ios::app); + auto handle = logOfs.native_handle(); + fcntl(handle, F_SETFD, FD_CLOEXEC); } void Debug::close() { -- cgit v1.2.3