From f848faeec8b3764532f0d1628beb2ee3f581bf0c Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sat, 11 Jan 2020 21:17:39 +0100 Subject: [PATCH] SystemMonitor: Use pledge() --- Applications/SystemMonitor/main.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Applications/SystemMonitor/main.cpp b/Applications/SystemMonitor/main.cpp index ee863d9793..8ea6492273 100644 --- a/Applications/SystemMonitor/main.cpp +++ b/Applications/SystemMonitor/main.cpp @@ -49,8 +49,18 @@ static NonnullRefPtr build_graphs_tab(); int main(int argc, char** argv) { + if (pledge("stdio shared_buffer rpath unix cpath fattr", nullptr) < 0) { + perror("pledge"); + return 1; + } + GApplication app(argc, argv); + if (pledge("stdio shared_buffer rpath unix", nullptr) < 0) { + perror("pledge"); + return 1; + } + auto keeper = GWidget::construct(); keeper->set_layout(make(Orientation::Vertical)); keeper->set_fill_with_background_color(true);