summaryrefslogtreecommitdiff
path: root/Userland/clear.cpp
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-02-18 10:58:04 +0100
committerAndreas Kling <kling@serenityos.org>2020-02-18 11:35:47 +0100
commit7266cee590418f8755ab3ca6e42e72b24c746510 (patch)
tree41000ca37e0fd12ca624efd984148e413b61f02d /Userland/clear.cpp
parent1612a1d4898eb65a14130265265cabe566b4ecbf (diff)
downloadserenity-7266cee590418f8755ab3ca6e42e72b24c746510.zip
clear: Use pledge()
Diffstat (limited to 'Userland/clear.cpp')
-rw-r--r--Userland/clear.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/Userland/clear.cpp b/Userland/clear.cpp
index dd6205f2ab..fd3f0506a4 100644
--- a/Userland/clear.cpp
+++ b/Userland/clear.cpp
@@ -25,9 +25,14 @@
*/
#include <stdio.h>
+#include <unistd.h>
int main(int, char**)
{
+ if (pledge("stdio", nullptr) < 0) {
+ perror("pledge");
+ return 1;
+ }
printf("\033[3J\033[H\033[2J");
fflush(stdout);
return 0;