From d6a1237cfe7585e2722f4861ef08fb72a3252cca Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Tue, 18 Feb 2020 10:46:06 +0100 Subject: [PATCH] yes: Use pledge() --- Userland/yes.cpp | 6 ++++++ 1 file changed, 6 insertions(+) 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 +#include int main(int argc, char** argv) { + if (pledge("stdio", nullptr) < 0) { + perror("pledge"); + return 1; + } + if (argc > 1) { for (;;) { puts(argv[1]);