浏览代码

HackStudio: Use pledge()

Andreas Kling 5 年之前
父节点
当前提交
457c7d9efd
共有 1 个文件被更改,包括 5 次插入0 次删除
  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;