diff options
author | Vaxry <[email protected]> | 2024-08-07 23:53:49 +0200 |
---|---|---|
committer | Vaxry <[email protected]> | 2024-08-07 23:53:49 +0200 |
commit | d489741b4f7a6c3165ffd04b5e9ad96d177fc661 (patch) | |
tree | d1915db7b6de959ea4cb9e6edaef429e012f7ec5 | |
parent | 9a09eac79b85c846e3a865a9078a3f8ff65a9259 (diff) | |
download | Hyprland-d489741b4f7a6c3165ffd04b5e9ad96d177fc661.tar.gz Hyprland-d489741b4f7a6c3165ffd04b5e9ad96d177fc661.zip |
use native_handle to cloexec debug log
-rw-r--r-- | CMakeLists.txt | 2 | ||||
-rw-r--r-- | src/debug/Log.cpp | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index fc8eafd5..cfbd431f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -62,7 +62,7 @@ else() endif() include_directories(. "src/" "subprojects/udis86/" "protocols/") -set(CMAKE_CXX_STANDARD 23) +set(CMAKE_CXX_STANDARD 26) add_compile_options( -Wall -Wextra 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 <fstream> #include <iostream> +#include <fcntl.h> 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() { |