1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 10:18:11 +00:00

Help: Use pledge()

This commit is contained in:
Andreas Kling 2020-01-12 02:23:55 +01:00
parent 017b34e1ad
commit b79711786c

View file

@ -20,11 +20,22 @@
#include <LibHTML/Parser/HTMLParser.h>
#include <LibMarkdown/MDDocument.h>
#include <libgen.h>
#include <stdio.h>
int main(int argc, char* argv[])
{
if (pledge("stdio unix shared_buffer cpath rpath fattr", nullptr) < 0) {
perror("pledge");
return 1;
}
GApplication app(argc, argv);
if (pledge("stdio unix shared_buffer rpath", nullptr) < 0) {
perror("pledge");
return 1;
}
auto window = GWindow::construct();
window->set_title("Help");
window->set_rect(300, 200, 570, 500);