LibWebView: Increase the open file limit in a more central location

We don't create a ChromeProcess in headless-browser, so it is currently
not increasing it's open file limit. This is causing crashes on macOS,
which has a very low default limit.
This commit is contained in:
Timothy Flynn 2024-10-07 13:36:17 -04:00 committed by Tim Flynn
commit 598fabbdd3
Notes: github-actions[bot] 2024-10-07 18:04:04 +00:00
5 changed files with 8 additions and 14 deletions

View file

@ -25,15 +25,6 @@ private:
UIProcessClient(NonnullOwnPtr<Core::LocalSocket>);
};
ErrorOr<ChromeProcess> ChromeProcess::create()
{
// Increase the open file limit, as the default limits on Linux cause us to run out of file descriptors with around 15 tabs open.
if (auto result = Core::System::set_resource_limits(RLIMIT_NOFILE, 8192); result.is_error())
warnln("Unable to increase open file limit: {}", result.error());
return ChromeProcess {};
}
ErrorOr<ChromeProcess::ProcessDisposition> ChromeProcess::connect(Vector<ByteString> const& raw_urls, NewWindow new_window)
{
static constexpr auto process_name = "Ladybird"sv;