diff options
author | Brendan Coles <bcoles@gmail.com> | 2020-11-01 19:37:48 +0000 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-11-02 13:15:54 +0100 |
commit | 9faca895d36a2929a81a50890ccecb112d643388 (patch) | |
tree | c5fef694a74d9db6814bad0e8596dfd5a275689b /Demos/Cube | |
parent | e8ff7c895ba991f9d9a5ef2b5c276c7b8674ce1b (diff) | |
download | serenity-9faca895d36a2929a81a50890ccecb112d643388.zip |
Demos: Use pledge and unveil
Diffstat (limited to 'Demos/Cube')
-rw-r--r-- | Demos/Cube/Cube.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Demos/Cube/Cube.cpp b/Demos/Cube/Cube.cpp index cdb2f6c484..f7273c7d79 100644 --- a/Demos/Cube/Cube.cpp +++ b/Demos/Cube/Cube.cpp @@ -193,6 +193,21 @@ int main(int argc, char** argv) { auto app = GUI::Application::construct(argc, argv); + if (pledge("stdio rpath shared_buffer", nullptr) < 0) { + perror("pledge"); + return 1; + } + + if (unveil("/res", "r") < 0) { + perror("unveil"); + return 1; + } + + if (unveil(nullptr, nullptr) < 0) { + perror("unveil"); + return 1; + } + auto window = GUI::Window::construct(); window->set_double_buffering_enabled(true); window->set_title("Cube"); |