diff options
author | Andreas Kling <kling@serenityos.org> | 2020-02-18 13:17:11 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-02-18 13:29:54 +0100 |
commit | 3b3b4b0e04ac98f39372ea9b89eb3995a869aea4 (patch) | |
tree | 864ef2ee841d770820749cfc332581b74baef6fd | |
parent | 60c8d2379a2e0523f652e7b602904ebf928e3904 (diff) | |
download | serenity-3b3b4b0e04ac98f39372ea9b89eb3995a869aea4.zip |
hostname: Use pledge()
-rw-r--r-- | Userland/hostname.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Userland/hostname.cpp b/Userland/hostname.cpp index dd0d9ae591..15eba021dd 100644 --- a/Userland/hostname.cpp +++ b/Userland/hostname.cpp @@ -31,6 +31,11 @@ int main(int argc, char** argv) { + if (pledge("stdio", nullptr) < 0) { + perror("pledge"); + return 1; + } + (void)argc; (void)argv; char buffer[HOST_NAME_MAX]; |