mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 22:47:47 +00:00
ProtocolServer: Use pledge()
This commit is contained in:
parent
1c755d848e
commit
0ad491a854
1 changed files with 8 additions and 0 deletions
|
@ -6,7 +6,15 @@
|
||||||
|
|
||||||
int main(int, char**)
|
int main(int, char**)
|
||||||
{
|
{
|
||||||
|
if (pledge("stdio inet shared_buffer unix rpath cpath fattr", nullptr) < 0) {
|
||||||
|
perror("pledge");
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
CEventLoop event_loop;
|
CEventLoop event_loop;
|
||||||
|
if (pledge("stdio inet shared_buffer unix", nullptr) < 0) {
|
||||||
|
perror("pledge");
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
(void)*new HttpProtocol;
|
(void)*new HttpProtocol;
|
||||||
auto server = CLocalServer::construct();
|
auto server = CLocalServer::construct();
|
||||||
bool ok = server->take_over_from_system_server();
|
bool ok = server->take_over_from_system_server();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue