From 2067c003ff2021a85be84d1f31ba0fabe2b9d0a1 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sat, 11 Jan 2020 23:50:05 +0100 Subject: [PATCH] TextEditor: Use pledge() --- Applications/TextEditor/main.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Applications/TextEditor/main.cpp b/Applications/TextEditor/main.cpp index d0354d4353..ad72ace1c1 100644 --- a/Applications/TextEditor/main.cpp +++ b/Applications/TextEditor/main.cpp @@ -1,10 +1,21 @@ #include "TextEditorWidget.h" #include +#include int main(int argc, char** argv) { + if (pledge("stdio rpath cpath wpath shared_buffer unix fattr", nullptr) < 0) { + perror("pledge"); + return 1; + } + GApplication app(argc, argv); + if (pledge("stdio rpath cpath wpath shared_buffer unix", nullptr) < 0) { + perror("pledge"); + return 1; + } + auto window = GWindow::construct(); window->set_title("Text Editor"); window->set_rect(20, 200, 640, 400);