mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 06:58:11 +00:00
Applications: Use pledge and unveil
This commit is contained in:
parent
9efcb5d290
commit
ed5469c1c2
5 changed files with 84 additions and 7 deletions
|
@ -41,8 +41,18 @@ int main(int argc, char** argv)
|
|||
args_parser.add_positional_argument(path, "Keyboard character mapping file.", "file", Core::ArgsParser::Required::No);
|
||||
args_parser.parse(argc, argv);
|
||||
|
||||
if (pledge("stdio thread rpath accept cpath wpath shared_buffer unix fattr", nullptr) < 0) {
|
||||
perror("pledge");
|
||||
return 1;
|
||||
}
|
||||
|
||||
auto app = GUI::Application::construct(argc, argv);
|
||||
|
||||
if (pledge("stdio thread rpath accept cpath wpath shared_buffer", nullptr) < 0) {
|
||||
perror("pledge");
|
||||
return 1;
|
||||
}
|
||||
|
||||
auto app_icon = GUI::Icon::default_icon("app-keyboard-mapper");
|
||||
|
||||
auto window = GUI::Window::construct();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue