WindowServer: Use pledge()

This commit is contained in:
Andreas Kling 2020-01-11 21:25:03 +01:00
parent 0ad491a854
commit d2e49719c4
Notes: sideshowbarker 2024-07-19 10:10:12 +09:00

View file

@ -10,6 +10,11 @@
int main(int, char**)
{
if (pledge("stdio shared_buffer rpath wpath cpath unix proc fattr", nullptr) < 0) {
perror("pledge");
return 1;
}
struct sigaction act;
memset(&act, 0, sizeof(act));
act.sa_flags = SA_NOCLDWAIT;
@ -30,6 +35,11 @@ int main(int, char**)
WSEventLoop loop;
if (pledge("stdio shared_buffer rpath wpath cpath unix proc", nullptr) < 0) {
perror("pledge");
return 1;
}
WSScreen screen(wm_config->read_num_entry("Screen", "Width", 1024),
wm_config->read_num_entry("Screen", "Height", 768));
WSCompositor::the();