diff options
author | Andreas Kling <awesomekling@gmail.com> | 2020-01-12 02:23:55 +0100 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2020-01-12 02:23:55 +0100 |
commit | b79711786c878e013702f821b54c095d918b1286 (patch) | |
tree | d1ab3e45927e42f0aab15a9c0419b8bf27446fa2 /Applications | |
parent | 017b34e1adf23b698589035f97f4c9dcd6a83006 (diff) | |
download | serenity-b79711786c878e013702f821b54c095d918b1286.zip |
Help: Use pledge()
Diffstat (limited to 'Applications')
-rw-r--r-- | Applications/Help/main.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Applications/Help/main.cpp b/Applications/Help/main.cpp index e89625d211..4ffe0cf86e 100644 --- a/Applications/Help/main.cpp +++ b/Applications/Help/main.cpp @@ -20,11 +20,22 @@ #include <LibHTML/Parser/HTMLParser.h> #include <LibMarkdown/MDDocument.h> #include <libgen.h> +#include <stdio.h> int main(int argc, char* argv[]) { + if (pledge("stdio unix shared_buffer cpath rpath fattr", nullptr) < 0) { + perror("pledge"); + return 1; + } + GApplication app(argc, argv); + if (pledge("stdio unix shared_buffer rpath", nullptr) < 0) { + perror("pledge"); + return 1; + } + auto window = GWindow::construct(); window->set_title("Help"); window->set_rect(300, 200, 570, 500); |