diff options
author | Andreas Kling <kling@serenityos.org> | 2020-02-18 10:46:06 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-02-18 11:35:47 +0100 |
commit | d6a1237cfe7585e2722f4861ef08fb72a3252cca (patch) | |
tree | 27e826d3e0df03fc0426c2338223874bc1f12bf3 /Userland/yes.cpp | |
parent | 00fa2aa0ec268ab8052db7cbd8a1dfa34c388b0e (diff) | |
download | serenity-d6a1237cfe7585e2722f4861ef08fb72a3252cca.zip |
yes: Use pledge()
Diffstat (limited to 'Userland/yes.cpp')
-rw-r--r-- | Userland/yes.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Userland/yes.cpp b/Userland/yes.cpp index a029b9dd46..58ac1f2c27 100644 --- a/Userland/yes.cpp +++ b/Userland/yes.cpp @@ -25,9 +25,15 @@ */ #include <stdio.h> +#include <unistd.h> int main(int argc, char** argv) { + if (pledge("stdio", nullptr) < 0) { + perror("pledge"); + return 1; + } + if (argc > 1) { for (;;) { puts(argv[1]); |