mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 08:57:35 +00:00
LookupServer: Use pledge()
This commit is contained in:
parent
1915151116
commit
10c1f27b7a
1 changed files with 11 additions and 0 deletions
|
@ -1,13 +1,24 @@
|
||||||
#include "LookupServer.h"
|
#include "LookupServer.h"
|
||||||
#include <LibCore/CEventLoop.h>
|
#include <LibCore/CEventLoop.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
int main(int argc, char** argv)
|
int main(int argc, char** argv)
|
||||||
{
|
{
|
||||||
(void)argc;
|
(void)argc;
|
||||||
(void)argv;
|
(void)argv;
|
||||||
|
|
||||||
|
if (pledge("stdio unix inet cpath rpath fattr", nullptr) < 0) {
|
||||||
|
perror("pledge");
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
CEventLoop event_loop;
|
CEventLoop event_loop;
|
||||||
LookupServer server;
|
LookupServer server;
|
||||||
|
|
||||||
|
if (pledge("stdio unix inet", nullptr) < 0) {
|
||||||
|
perror("pledge");
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
return event_loop.exec();
|
return event_loop.exec();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue