From e9a5b7456eeb8019aee4f742b76ae3746a02d5b2 Mon Sep 17 00:00:00 2001 From: Brian Gianforcaro Date: Mon, 13 Jan 2020 00:35:37 -0800 Subject: [PATCH] About: Use pledge() --- Applications/About/main.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Applications/About/main.cpp b/Applications/About/main.cpp index 51a109308b..dd1e0a26c0 100644 --- a/Applications/About/main.cpp +++ b/Applications/About/main.cpp @@ -5,11 +5,22 @@ #include #include #include +#include int main(int argc, char** argv) { + if (pledge("stdio shared_buffer unix rpath cpath fattr", nullptr) < 0) { + perror("pledge"); + return 1; + } + GApplication app(argc, argv); + if (pledge("stdio shared_buffer unix rpath", nullptr) < 0) { + perror("pledge"); + return 1; + } + auto window = GWindow::construct(); window->set_title("About SerenityOS"); Rect window_rect { 0, 0, 240, 180 };