1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 20:37:35 +00:00

WebDriver: Remove the WebContent socket file when closing the session

Otherwise it is left on disk forever.
This commit is contained in:
Timothy Flynn 2022-12-15 10:40:11 -05:00 committed by Linus Groh
parent 956fa84f12
commit cbbaf8ea2c
3 changed files with 14 additions and 11 deletions

View file

@ -67,8 +67,6 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
auto webdriver_socket_path = DeprecatedString::formatted("{}/webdriver", TRY(Core::StandardPaths::runtime_directory()));
TRY(Core::Directory::create(webdriver_socket_path, Core::Directory::CreateDirectories::Yes));
TRY(Core::System::pledge("stdio accept rpath recvfd inet unix proc exec fattr"));
Core::EventLoop loop;
auto server = TRY(Core::TCPServer::try_create());
@ -106,6 +104,6 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
TRY(Core::System::unveil(webdriver_socket_path, "rwc"sv));
TRY(Core::System::unveil(nullptr, nullptr));
TRY(Core::System::pledge("stdio accept rpath recvfd unix proc exec fattr"));
TRY(Core::System::pledge("stdio accept cpath rpath recvfd unix proc exec fattr"));
return loop.exec();
}