diff options
author | Andreas Kling <kling@serenityos.org> | 2020-02-18 13:16:33 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-02-18 13:29:54 +0100 |
commit | 60c8d2379a2e0523f652e7b602904ebf928e3904 (patch) | |
tree | 36650f5fbb0efaeec8062577b58cd6d48feb431e /Userland | |
parent | 0bef6c9d78c0622e2c138628124ef7aacc0fa17f (diff) | |
download | serenity-60c8d2379a2e0523f652e7b602904ebf928e3904.zip |
kill: Use pledge()
Diffstat (limited to 'Userland')
-rw-r--r-- | Userland/kill.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Userland/kill.cpp b/Userland/kill.cpp index 4ac1a8206b..ea4805a1a0 100644 --- a/Userland/kill.cpp +++ b/Userland/kill.cpp @@ -38,6 +38,11 @@ static void print_usage_and_exit() int main(int argc, char** argv) { + if (pledge("stdio proc", nullptr) < 0) { + perror("pledge"); + return 1; + } + if (argc != 2 && argc != 3) print_usage_and_exit(); bool ok; |