mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-23 09:51:57 -05:00
echo: Use pledge()
This commit is contained in:
parent
d6a1237cfe
commit
1612a1d489
1 changed files with 6 additions and 0 deletions
|
@ -25,9 +25,15 @@
|
|||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
if (pledge("stdio", nullptr) < 0) {
|
||||
perror("pledge");
|
||||
return 1;
|
||||
}
|
||||
|
||||
for (int i = 1; i < argc; ++i) {
|
||||
fputs(argv[i], stdout);
|
||||
if (i != argc - 1)
|
||||
|
|
Loading…
Add table
Reference in a new issue