ladybird/Applications/Taskbar/main.cpp
Andreas Kling f813bb52a2 Applications+DevTools+MenuApplets: Drop "unix" pledge when possible
Now that the "unix" pledge is no longer required for socket I/O, we can
drop it after making the connections we need in a program.

In most GUI program cases, once we've connected to the WindowServer by
instantiating a GApplication, we no longer need "unix" :^)
2020-01-12 12:03:57 +01:00

29 lines
588 B
C++

#include "TaskbarWindow.h"
#include <LibGUI/GApplication.h>
#include <signal.h>
#include <stdio.h>
int main(int argc, char** argv)
{
if (pledge("stdio shared_buffer proc exec rpath unix cpath fattr", nullptr) < 0) {
perror("pledge");
return 1;
}
GApplication app(argc, argv);
if (pledge("stdio shared_buffer proc exec rpath", nullptr) < 0) {
perror("pledge");
return 1;
}
TaskbarWindow window;
window.show();
signal(SIGCHLD, [](int signo) {
(void)signo;
wait(nullptr);
});
return app.exec();
}