aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorVaxry <[email protected]>2024-08-07 23:53:49 +0200
committerVaxry <[email protected]>2024-08-07 23:53:49 +0200
commitd489741b4f7a6c3165ffd04b5e9ad96d177fc661 (patch)
treed1915db7b6de959ea4cb9e6edaef429e012f7ec5
parent9a09eac79b85c846e3a865a9078a3f8ff65a9259 (diff)
downloadHyprland-d489741b4f7a6c3165ffd04b5e9ad96d177fc661.tar.gz
Hyprland-d489741b4f7a6c3165ffd04b5e9ad96d177fc661.zip
use native_handle to cloexec debug log
-rw-r--r--CMakeLists.txt2
-rw-r--r--src/debug/Log.cpp3
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() {