diff --git a/Shell/main.cpp b/Shell/main.cpp index 0b98cdb781..c43ceac85a 100644 --- a/Shell/main.cpp +++ b/Shell/main.cpp @@ -843,6 +843,11 @@ void save_history() int main(int argc, char** argv) { + if (pledge("stdio rpath wpath cpath proc exec tty", nullptr) < 0) { + perror("pledge"); + return 1; + } + g.uid = getuid(); g.sid = setsid(); tcsetpgrp(0, getpgrp());