clear: Use pledge()

This commit is contained in:
Andreas Kling 2020-02-18 10:58:04 +01:00
commit 7266cee590
Notes: sideshowbarker 2024-07-19 09:14:39 +09:00

View file

@ -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;