1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 16:57:35 +00:00

About: Use pledge()

This commit is contained in:
Brian Gianforcaro 2020-01-13 00:35:37 -08:00 committed by Andreas Kling
parent 02704a73e9
commit e9a5b7456e

View file

@ -5,11 +5,22 @@
#include <LibGUI/GLabel.h>
#include <LibGUI/GWindow.h>
#include <sys/utsname.h>
#include <stdio.h>
int main(int argc, char** argv)
{
if (pledge("stdio shared_buffer unix rpath cpath fattr", nullptr) < 0) {
perror("pledge");
return 1;
}
GApplication app(argc, argv);
if (pledge("stdio shared_buffer unix rpath", nullptr) < 0) {
perror("pledge");
return 1;
}
auto window = GWindow::construct();
window->set_title("About SerenityOS");
Rect window_rect { 0, 0, 240, 180 };