1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 20:27:45 +00:00

head: Use pledge()

This commit is contained in:
Brian Gianforcaro 2020-02-22 12:14:21 -08:00 committed by Andreas Kling
parent 21c78e2fc3
commit 540d9caa8e

View file

@ -35,6 +35,11 @@ int head(const String& filename, bool print_filename, int line_count, int char_c
int main(int argc, char** argv)
{
if (pledge("stdio rpath", nullptr) < 0) {
perror("pledge");
return 1;
}
int line_count = 0;
int char_count = 0;
bool never_print_filenames = false;