diff options
| author | Vaxry <43317083+vaxerski@users.noreply.github.com> | 2024-08-08 10:54:41 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-08-08 11:54:41 +0200 |
| commit | 83a334f97df4389ca30cb63e50317a66a82562b9 (patch) | |
| tree | be03ceb8abfd97443ab846cfb624d38028f52c74 /src/debug/Log.cpp | |
| parent | 9a09eac79b85c846e3a865a9078a3f8ff65a9259 (diff) | |
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 <mihai@fufexan.net>
Diffstat (limited to 'src/debug/Log.cpp')
| -rw-r--r-- | src/debug/Log.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
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() { |
