Index: src/gfx/main.cpp
--- src/gfx/main.cpp.orig
+++ src/gfx/main.cpp
@@ -12,6 +12,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <string_view>
+#include <unistd.h>
 #include <vector>
 
 #include "diagnostics.hpp"
@@ -741,6 +742,11 @@ static void replaceExtension(std::string &path, char c
 }
 
 int main(int argc, char *argv[]) {
+	if (pledge("stdio rpath wpath cpath", NULL) == -1) {
+		fputs("pledge", stderr);
+		return 1;
+	}
+
 	struct AtFileStackEntry {
 		int parentInd;            // Saved offset into parent argv
 		std::vector<char *> argv; // This context's arg pointer vec
