mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 08:17:35 +00:00
sleep: Use pledge()
This commit is contained in:
parent
8f6dc3e9a0
commit
a7b984ec49
1 changed files with 5 additions and 0 deletions
|
@ -35,6 +35,11 @@ void handle_sigint(int)
|
||||||
|
|
||||||
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: sleep <seconds>\n");
|
printf("usage: sleep <seconds>\n");
|
||||||
return 1;
|
return 1;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue