mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 06:17:35 +00:00
uname: Use pledge()
This commit is contained in:
parent
feb4c683eb
commit
f67f70302b
1 changed files with 6 additions and 0 deletions
|
@ -26,9 +26,15 @@
|
|||
|
||||
#include <stdio.h>
|
||||
#include <sys/utsname.h>
|
||||
#include <unistd.h>
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
if (pledge("stdio", nullptr) < 0) {
|
||||
perror("pledge");
|
||||
return 1;
|
||||
}
|
||||
|
||||
utsname uts;
|
||||
int rc = uname(&uts);
|
||||
if (rc < 0) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue