Browse Source

HackStudio: Use pledge()

Andreas Kling 5 năm trước cách đây
mục cha
commit
457c7d9efd
1 tập tin đã thay đổi với 5 bổ sung0 xóa
  1. 5 0
      DevTools/HackStudio/main.cpp

+ 5 - 0
DevTools/HackStudio/main.cpp

@@ -96,6 +96,11 @@ bool make_is_available();
 
 int main(int argc, char** argv)
 {
+    if (pledge("stdio tty rpath cpath wpath shared_buffer proc unix fattr", nullptr) < 0) {
+        perror("pledge");
+        return 1;
+    }
+
     GApplication app(argc, argv);
 
     Function<void()> update_actions;