diff options
author | Itamar <itamar8910@gmail.com> | 2020-04-11 16:36:55 +0300 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-04-13 00:53:22 +0200 |
commit | 479348c9e74ab4c89ee818ac9f8a03dee46ae6dd (patch) | |
tree | f22c9133f71a8d87378f3b141d152c07125734be /Applications/Debugger | |
parent | 3e9a7175d1137c481120e40100d8b98e1db9036b (diff) | |
download | serenity-479348c9e74ab4c89ee818ac9f8a03dee46ae6dd.zip |
Debugger: Add pledges
Diffstat (limited to 'Applications/Debugger')
-rw-r--r-- | Applications/Debugger/DebugSession.cpp | 1 | ||||
-rw-r--r-- | Applications/Debugger/main.cpp | 7 |
2 files changed, 5 insertions, 3 deletions
diff --git a/Applications/Debugger/DebugSession.cpp b/Applications/Debugger/DebugSession.cpp index 8766ad60b2..86c59e8196 100644 --- a/Applications/Debugger/DebugSession.cpp +++ b/Applications/Debugger/DebugSession.cpp @@ -77,7 +77,6 @@ OwnPtr<DebugSession> DebugSession::exec_and_attach(const String& command) return nullptr; } - // TOOD: do we actually need this waitpid? if (waitpid(pid, nullptr, WSTOPPED) != pid) { perror("waitpid"); return nullptr; diff --git a/Applications/Debugger/main.cpp b/Applications/Debugger/main.cpp index 05fc498487..94fbe0ffcb 100644 --- a/Applications/Debugger/main.cpp +++ b/Applications/Debugger/main.cpp @@ -159,8 +159,11 @@ void print_help() int main(int argc, char** argv) { - // TODO: pledge & unveil - // TODO: check that strace still works + if (pledge("stdio proc exec rpath", nullptr) < 0) { + perror("pledge"); + return 1; + } + if (argc == 1) return usage(); |