diff options
Diffstat (limited to 'Userland')
-rw-r--r-- | Userland/cat.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Userland/cat.cpp b/Userland/cat.cpp index 0e8110fdab..5fcd739ec0 100644 --- a/Userland/cat.cpp +++ b/Userland/cat.cpp @@ -9,6 +9,11 @@ int main(int argc, char** argv) { + if (pledge("stdio rpath", nullptr) < 0) { + perror("pledge"); + return 1; + } + Vector<int> fds; if (argc > 1) { for (int i = 1; i < argc; i++) { @@ -22,6 +27,12 @@ int main(int argc, char** argv) } else { fds.append(0); } + + if (pledge("stdio", nullptr) < 0) { + perror("pledge"); + return 1; + } + for (auto& fd : fds) { for (;;) { char buf[32768]; |