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
Notes: sideshowbarker 2024-07-19 09:09:50 +09:00

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;