[gnome-shell] main: Raise the NOFILE limit if a Wayland compositor



commit 5b8a32ca71ebfe5846304e2f78538c29c58109ea
Author: Olivier Fourdan <ofourdan redhat com>
Date:   Wed Jan 19 10:24:34 2022 +0100

    main: Raise the NOFILE limit if a Wayland compositor
    
    When being run as a Wayland compositor, raise the NOFILE limit to
    mitigate the risk of running out of file descriptors.
    
    Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2117>

 src/main.c | 3 +++
 1 file changed, 3 insertions(+)
---
diff --git a/src/main.c b/src/main.c
index 3cd9e10a5b..03708fc8fe 100644
--- a/src/main.c
+++ b/src/main.c
@@ -554,6 +554,9 @@ main (int argc, char **argv)
 
   shell_profiler_init ();
 
+  if (meta_context_get_compositor_type (context) == META_COMPOSITOR_TYPE_WAYLAND)
+    meta_context_raise_rlimit_nofile (context, NULL);
+
   if (!meta_context_start (context, &error))
     {
       g_printerr ("GNOME Shell failed to start: %s", error->message);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]