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: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2235>
This commit is contained in:
parent
8305c7bd06
commit
6427b27602
@ -170,6 +170,9 @@ main (int argc, char **argv)
|
|||||||
g_child_watch_add (command_pid, command_exited_cb, context);
|
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))
|
if (!meta_context_run_main_loop (context, &error))
|
||||||
{
|
{
|
||||||
g_printerr ("Mutter terminated with a failure: %s\n", error->message);
|
g_printerr ("Mutter terminated with a failure: %s\n", error->message);
|
||||||
|
Loading…
Reference in New Issue
Block a user