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>
This commit is contained in:
Olivier Fourdan 2022-01-19 10:24:34 +01:00
parent 9862ee9b25
commit 5b8a32ca71

View File

@ -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);