1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 07:27:45 +00:00

WebContent+WebDriver: Move WebDriver socket to the standard runtime path

This will allow Ladybird to use local socket files rather than passing
around a bunch of socket FDs.
This commit is contained in:
Timothy Flynn 2022-12-15 07:36:17 -05:00 committed by Linus Groh
parent 701e77019c
commit 366f24a73b
3 changed files with 12 additions and 5 deletions

View file

@ -11,6 +11,7 @@
#include "Session.h"
#include "Client.h"
#include <LibCore/LocalServer.h>
#include <LibCore/StandardPaths.h>
#include <LibCore/Stream.h>
#include <LibCore/System.h>
#include <unistd.h>
@ -61,7 +62,7 @@ ErrorOr<void> Session::start()
{
auto promise = TRY(ServerPromise::try_create());
auto web_content_socket_path = DeprecatedString::formatted("/tmp/webdriver/session_{}_{}", getpid(), m_id);
auto web_content_socket_path = DeprecatedString::formatted("{}/webdriver/session_{}_{}", TRY(Core::StandardPaths::runtime_directory()), getpid(), m_id);
auto web_content_server = TRY(create_server(web_content_socket_path, promise));
if (m_options.headless) {