aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Compositor.hpp
diff options
context:
space:
mode:
authorVaxry <[email protected]>2024-06-19 18:36:40 +0200
committerVaxry <[email protected]>2024-06-19 18:36:40 +0200
commitc1e21719a2fff2fa9549f00053ac40173da54af9 (patch)
treefca9aaedfd119c14b10a8bff8b3c5f5c448aef50 /src/Compositor.hpp
parentdef5fcb2128304392e9e76bcc081d088b316a197 (diff)
downloadHyprland-c1e21719a2fff2fa9549f00053ac40173da54af9.tar.gz
Hyprland-c1e21719a2fff2fa9549f00053ac40173da54af9.zip
core: avoid bumping hard rlimits, restore on fork
ref #6584
Diffstat (limited to 'src/Compositor.hpp')
-rw-r--r--src/Compositor.hpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/Compositor.hpp b/src/Compositor.hpp
index 242c3b13..5a1d8a64 100644
--- a/src/Compositor.hpp
+++ b/src/Compositor.hpp
@@ -3,6 +3,7 @@
#include <memory>
#include <deque>
#include <list>
+#include <sys/resource.h>
#include "defines.hpp"
#include "debug/Log.hpp"
@@ -81,6 +82,8 @@ class CCompositor {
void cleanup();
void createLockFile();
void removeLockFile();
+ void bumpNofile();
+ void restoreNofile();
WP<CWLSurfaceResource> m_pLastFocus;
PHLWINDOWREF m_pLastWindow;
@@ -190,8 +193,9 @@ class CCompositor {
void initManagers(eManagersInitStage stage);
void prepareFallbackOutput();
- uint64_t m_iHyprlandPID = 0;
- wl_event_source* m_critSigSource = nullptr;
+ uint64_t m_iHyprlandPID = 0;
+ wl_event_source* m_critSigSource = nullptr;
+ rlimit m_sOriginalNofile = {0};
};
inline std::unique_ptr<CCompositor> g_pCompositor;