소스 검색

SystemMonitor: Use pledge()

Andreas Kling 5 년 전
부모
커밋
f848faeec8
1개의 변경된 파일10개의 추가작업 그리고 0개의 파일을 삭제
  1. 10 0
      Applications/SystemMonitor/main.cpp

+ 10 - 0
Applications/SystemMonitor/main.cpp

@@ -49,8 +49,18 @@ static NonnullRefPtr<GWidget> 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<GBoxLayout>(Orientation::Vertical));
     keeper->set_fill_with_background_color(true);