KeyboardMapper: Do not drop the unix pledge

Without it, KeyboardMapper crashes as soon as you try to open a file.
This commit is contained in:
Jelle Raaijmakers 2023-05-31 15:45:31 +02:00 committed by Andreas Kling
parent 9e496a96a6
commit 13086d3c97
Notes: sideshowbarker 2024-07-17 07:16:27 +09:00

View File

@ -26,9 +26,6 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
TRY(Core::System::pledge("stdio getkeymap thread rpath cpath wpath recvfd sendfd unix"));
auto app = TRY(GUI::Application::create(arguments));
TRY(Core::System::pledge("stdio getkeymap thread rpath cpath wpath recvfd sendfd"));
auto app_icon = GUI::Icon::default_icon("app-keyboard-mapper"sv);
auto window = GUI::Window::construct();
@ -43,7 +40,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
else
TRY(keyboard_mapper_widget->load_map_from_file(path));
TRY(Core::System::pledge("stdio thread rpath cpath wpath recvfd sendfd"));
TRY(Core::System::pledge("stdio thread rpath cpath wpath recvfd sendfd unix"));
auto open_action = GUI::CommonActions::make_open_action(
[&](auto&) {