mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 15:07:45 +00:00
Browser: Drop "unix" pledge after starting up
We now instantiate a connection to ProtocolServer right away by calling ResourceLoader::the(). This allows us to drop the "unix" pledge. :^)
This commit is contained in:
parent
e12798c0a9
commit
e588a41ac9
1 changed files with 6 additions and 2 deletions
|
@ -30,18 +30,22 @@ static const char* home_url = "file:///home/anon/www/welcome.html";
|
||||||
|
|
||||||
int main(int argc, char** argv)
|
int main(int argc, char** argv)
|
||||||
{
|
{
|
||||||
if (pledge("stdio dns unix shared_buffer cpath rpath fattr", nullptr) < 0) {
|
if (pledge("stdio unix shared_buffer cpath rpath fattr", nullptr) < 0) {
|
||||||
perror("pledge");
|
perror("pledge");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
GApplication app(argc, argv);
|
GApplication app(argc, argv);
|
||||||
|
|
||||||
if (pledge("stdio dns unix shared_buffer rpath", nullptr) < 0) {
|
// Connect to the ProtocolServer immediately so we can drop the "unix" pledge.
|
||||||
|
ResourceLoader::the();
|
||||||
|
|
||||||
|
if (pledge("stdio shared_buffer rpath", nullptr) < 0) {
|
||||||
perror("pledge");
|
perror("pledge");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
auto window = GWindow::construct();
|
auto window = GWindow::construct();
|
||||||
window->set_rect(100, 100, 640, 480);
|
window->set_rect(100, 100, 640, 480);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue