Przeglądaj źródła

HackStudio: Use pledge()

Andreas Kling 5 lat temu
rodzic
commit
457c7d9efd
1 zmienionych plików z 5 dodań i 0 usunięć
  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)
 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);
     GApplication app(argc, argv);
 
 
     Function<void()> update_actions;
     Function<void()> update_actions;