summaryrefslogtreecommitdiff
path: root/Applications
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2020-01-12 02:23:55 +0100
committerAndreas Kling <awesomekling@gmail.com>2020-01-12 02:23:55 +0100
commitb79711786c878e013702f821b54c095d918b1286 (patch)
treed1ab3e45927e42f0aab15a9c0419b8bf27446fa2 /Applications
parent017b34e1adf23b698589035f97f4c9dcd6a83006 (diff)
downloadserenity-b79711786c878e013702f821b54c095d918b1286.zip
Help: Use pledge()
Diffstat (limited to 'Applications')
-rw-r--r--Applications/Help/main.cpp11
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);