diff options
author | Andreas Kling <awesomekling@gmail.com> | 2020-01-13 12:22:49 +0100 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2020-01-13 14:41:15 +0100 |
commit | 56428e764e39252cda1cfd9d0efcbb3a6a0fdd8d (patch) | |
tree | b24c6d887bd32c2213fbe1296375137dca51beed /Applications/Calculator | |
parent | 6182a1a71c83ea5c223894e5665abbec57fa2150 (diff) | |
download | serenity-56428e764e39252cda1cfd9d0efcbb3a6a0fdd8d.zip |
Applications: Use pledge()
Add some basic pledges to the following apps:
- Calculator
- DisplayProperties
- FontEditor
- HexEditor
- PaintBrush
Diffstat (limited to 'Applications/Calculator')
-rw-r--r-- | Applications/Calculator/main.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Applications/Calculator/main.cpp b/Applications/Calculator/main.cpp index f38251eb42..e89302bf59 100644 --- a/Applications/Calculator/main.cpp +++ b/Applications/Calculator/main.cpp @@ -5,11 +5,22 @@ #include <LibGUI/GApplication.h> #include <LibGUI/GMenuBar.h> #include <LibGUI/GWindow.h> +#include <stdio.h> 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); + if (pledge("stdio shared_buffer rpath", nullptr) < 0) { + perror("pledge"); + return 1; + } + auto window = GWindow::construct(); window->set_title("Calculator"); window->set_resizable(false); |