ソースを参照

Playground: Use pledge()

Linus Groh 4 年 前
コミット
7d72168b14
1 ファイル変更11 行追加0 行削除
  1. 11 0
      DevTools/Playground/main.cpp

+ 11 - 0
DevTools/Playground/main.cpp

@@ -166,7 +166,18 @@ private:
 
 int main(int argc, char** argv)
 {
+    if (pledge("stdio thread shared_buffer accept cpath rpath wpath unix fattr", nullptr) < 0) {
+        perror("pledge");
+        return 1;
+    }
+
     auto app = GUI::Application::construct(argc, argv);
+
+    if (pledge("stdio thread shared_buffer accept rpath cpath wpath", nullptr) < 0) {
+        perror("pledge");
+        return 1;
+    }
+
     auto app_icon = GUI::Icon::default_icon("app-playground");
     auto window = GUI::Window::construct();
     window->set_title("GML Playground");