mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 21:37:36 +00:00
basename: Use pledge()
This commit is contained in:
parent
35ba4bf005
commit
0bef6c9d78
1 changed files with 5 additions and 0 deletions
|
@ -29,6 +29,11 @@
|
||||||
|
|
||||||
int main(int argc, char** argv)
|
int main(int argc, char** argv)
|
||||||
{
|
{
|
||||||
|
if (pledge("stdio", nullptr) < 0) {
|
||||||
|
perror("pledge");
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
if (argc != 2) {
|
if (argc != 2) {
|
||||||
printf("usage: basename <path>\n");
|
printf("usage: basename <path>\n");
|
||||||
return 1;
|
return 1;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue