summaryrefslogtreecommitdiff
path: root/Applications
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2020-01-12 11:59:11 +0100
committerAndreas Kling <awesomekling@gmail.com>2020-01-12 12:03:57 +0100
commitf813bb52a28cfb42dcf73015e3ca659658c7d4d6 (patch)
treece8424de020d7395d7ad0ed5d70f5a8c1f81da4a /Applications
parent114a770c6fb5fb9a269b3b662375e0811dfd37e9 (diff)
downloadserenity-f813bb52a28cfb42dcf73015e3ca659658c7d4d6.zip
Applications+DevTools+MenuApplets: Drop "unix" pledge when possible
Now that the "unix" pledge is no longer required for socket I/O, we can drop it after making the connections we need in a program. In most GUI program cases, once we've connected to the WindowServer by instantiating a GApplication, we no longer need "unix" :^)
Diffstat (limited to 'Applications')
-rw-r--r--Applications/FileManager/main.cpp5
-rw-r--r--Applications/Help/main.cpp2
-rw-r--r--Applications/QuickShow/main.cpp2
-rw-r--r--Applications/SoundPlayer/main.cpp5
-rw-r--r--Applications/SystemMonitor/main.cpp2
-rw-r--r--Applications/Taskbar/main.cpp2
-rw-r--r--Applications/Terminal/main.cpp2
-rw-r--r--Applications/TextEditor/main.cpp2
8 files changed, 16 insertions, 6 deletions
diff --git a/Applications/FileManager/main.cpp b/Applications/FileManager/main.cpp
index 05edfee89e..d97c16156b 100644
--- a/Applications/FileManager/main.cpp
+++ b/Applications/FileManager/main.cpp
@@ -50,6 +50,11 @@ int main(int argc, char** argv)
GApplication app(argc, argv);
+ if (pledge("stdio thread shared_buffer cpath rpath wpath fattr proc exec", nullptr) < 0) {
+ perror("pledge");
+ return 1;
+ }
+
auto window = GWindow::construct();
window->set_title("File Manager");
diff --git a/Applications/Help/main.cpp b/Applications/Help/main.cpp
index 4ffe0cf86e..19b31a517c 100644
--- a/Applications/Help/main.cpp
+++ b/Applications/Help/main.cpp
@@ -31,7 +31,7 @@ int main(int argc, char* argv[])
GApplication app(argc, argv);
- if (pledge("stdio unix shared_buffer rpath", nullptr) < 0) {
+ if (pledge("stdio shared_buffer rpath", nullptr) < 0) {
perror("pledge");
return 1;
}
diff --git a/Applications/QuickShow/main.cpp b/Applications/QuickShow/main.cpp
index 6461c79723..b46b576e79 100644
--- a/Applications/QuickShow/main.cpp
+++ b/Applications/QuickShow/main.cpp
@@ -18,7 +18,7 @@ int main(int argc, char** argv)
GApplication app(argc, argv);
- if (pledge("stdio unix shared_buffer rpath", nullptr) < 0) {
+ if (pledge("stdio shared_buffer rpath", nullptr) < 0) {
perror("pledge");
return 1;
}
diff --git a/Applications/SoundPlayer/main.cpp b/Applications/SoundPlayer/main.cpp
index 583e4aa810..b5d804ae9b 100644
--- a/Applications/SoundPlayer/main.cpp
+++ b/Applications/SoundPlayer/main.cpp
@@ -27,6 +27,11 @@ int main(int argc, char** argv)
auto audio_client = AClientConnection::construct();
audio_client->handshake();
+ if (pledge("stdio shared_buffer rpath", nullptr) < 0) {
+ perror("pledge");
+ return 1;
+ }
+
auto window = GWindow::construct();
window->set_title("SoundPlayer");
window->set_resizable(false);
diff --git a/Applications/SystemMonitor/main.cpp b/Applications/SystemMonitor/main.cpp
index 303137399c..e9fab809a5 100644
--- a/Applications/SystemMonitor/main.cpp
+++ b/Applications/SystemMonitor/main.cpp
@@ -56,7 +56,7 @@ int main(int argc, char** argv)
GApplication app(argc, argv);
- if (pledge("stdio proc shared_buffer rpath unix", nullptr) < 0) {
+ if (pledge("stdio proc shared_buffer rpath", nullptr) < 0) {
perror("pledge");
return 1;
}
diff --git a/Applications/Taskbar/main.cpp b/Applications/Taskbar/main.cpp
index c64ba482e9..6624d4385d 100644
--- a/Applications/Taskbar/main.cpp
+++ b/Applications/Taskbar/main.cpp
@@ -12,7 +12,7 @@ int main(int argc, char** argv)
GApplication app(argc, argv);
- if (pledge("stdio shared_buffer proc exec rpath unix", nullptr) < 0) {
+ if (pledge("stdio shared_buffer proc exec rpath", nullptr) < 0) {
perror("pledge");
return 1;
}
diff --git a/Applications/Terminal/main.cpp b/Applications/Terminal/main.cpp
index 4fdb2fad9d..6c0aa6c7c3 100644
--- a/Applications/Terminal/main.cpp
+++ b/Applications/Terminal/main.cpp
@@ -153,7 +153,7 @@ int main(int argc, char** argv)
GApplication app(argc, argv);
- if (pledge("stdio tty rpath cpath wpath shared_buffer proc exec unix", nullptr) < 0) {
+ if (pledge("stdio tty rpath cpath wpath shared_buffer proc exec", nullptr) < 0) {
perror("pledge");
return 1;
}
diff --git a/Applications/TextEditor/main.cpp b/Applications/TextEditor/main.cpp
index ad72ace1c1..09c0567c51 100644
--- a/Applications/TextEditor/main.cpp
+++ b/Applications/TextEditor/main.cpp
@@ -11,7 +11,7 @@ int main(int argc, char** argv)
GApplication app(argc, argv);
- if (pledge("stdio rpath cpath wpath shared_buffer unix", nullptr) < 0) {
+ if (pledge("stdio rpath cpath wpath shared_buffer", nullptr) < 0) {
perror("pledge");
return 1;
}