mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 18:28:12 +00:00
touch: Use pledge()
This commit is contained in:
parent
b58728ed99
commit
feb4c683eb
1 changed files with 5 additions and 0 deletions
|
@ -50,6 +50,11 @@ static bool file_exists(const char* path)
|
|||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
if (pledge("stdio rpath cpath fattr", nullptr)) {
|
||||
perror("pledge");
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (argc != 2) {
|
||||
fprintf(stderr, "usage: touch <path>\n");
|
||||
return 1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue