mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 15:48:12 +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 <LibCore/CEventLoop.h>
|
||||
#include <stdio.h>
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
(void)argc;
|
||||
(void)argv;
|
||||
|
||||
if (pledge("stdio unix inet cpath rpath fattr", nullptr) < 0) {
|
||||
perror("pledge");
|
||||
return 1;
|
||||
}
|
||||
|
||||
CEventLoop event_loop;
|
||||
LookupServer server;
|
||||
|
||||
if (pledge("stdio unix inet", nullptr) < 0) {
|
||||
perror("pledge");
|
||||
return 1;
|
||||
}
|
||||
|
||||
return event_loop.exec();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue