From 6427b2760263aa11864ea95279699f96cea4d771 Mon Sep 17 00:00:00 2001 From: Olivier Fourdan Date: Tue, 18 Jan 2022 17:58:49 +0100 Subject: [PATCH] mutter: 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: --- src/core/mutter.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/core/mutter.c b/src/core/mutter.c index 51b9951b1..3772ecca4 100644 --- a/src/core/mutter.c +++ b/src/core/mutter.c @@ -170,6 +170,9 @@ main (int argc, char **argv) g_child_watch_add (command_pid, command_exited_cb, context); } + if (meta_context_get_compositor_type (context) == META_COMPOSITOR_TYPE_WAYLAND) + meta_context_raise_rlimit_nofile (context, NULL); + if (!meta_context_run_main_loop (context, &error)) { g_printerr ("Mutter terminated with a failure: %s\n", error->message);