mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 18:57:34 +00:00
About: Use pledge()
This commit is contained in:
parent
02704a73e9
commit
e9a5b7456e
1 changed files with 11 additions and 0 deletions
|
@ -5,11 +5,22 @@
|
||||||
#include <LibGUI/GLabel.h>
|
#include <LibGUI/GLabel.h>
|
||||||
#include <LibGUI/GWindow.h>
|
#include <LibGUI/GWindow.h>
|
||||||
#include <sys/utsname.h>
|
#include <sys/utsname.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
int main(int argc, char** argv)
|
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);
|
GApplication app(argc, argv);
|
||||||
|
|
||||||
|
if (pledge("stdio shared_buffer unix rpath", nullptr) < 0) {
|
||||||
|
perror("pledge");
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
auto window = GWindow::construct();
|
auto window = GWindow::construct();
|
||||||
window->set_title("About SerenityOS");
|
window->set_title("About SerenityOS");
|
||||||
Rect window_rect { 0, 0, 240, 180 };
|
Rect window_rect { 0, 0, 240, 180 };
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue