summaryrefslogtreecommitdiff
path: root/Applications
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2020-01-12 13:16:43 +0100
committerAndreas Kling <awesomekling@gmail.com>2020-01-12 13:20:02 +0100
commite588a41ac9ca1c5001e00a0055bdb8651e0ca37e (patch)
tree1753299d7dd18b054744abf373621ef80afdb3a2 /Applications
parente12798c0a9003990aac2421b77991a516de60f98 (diff)
downloadserenity-e588a41ac9ca1c5001e00a0055bdb8651e0ca37e.zip
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. :^)
Diffstat (limited to 'Applications')
-rw-r--r--Applications/Browser/main.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/Applications/Browser/main.cpp b/Applications/Browser/main.cpp
index 256f966d0b..68a1214f5b 100644
--- a/Applications/Browser/main.cpp
+++ b/Applications/Browser/main.cpp
@@ -30,18 +30,22 @@ static const char* home_url = "file:///home/anon/www/welcome.html";
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");
return 1;
}
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");
return 1;
}
+
auto window = GWindow::construct();
window->set_rect(100, 100, 640, 480);