1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 17:28:11 +00:00

strace: Use pledge()

This commit is contained in:
Andreas Kling 2021-01-11 22:36:09 +01:00
parent f03800cee3
commit e5234f9560

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2018-2021, Andreas Kling <kling@serenityos.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -53,6 +53,11 @@ static void handle_sigint(int)
int main(int argc, char** argv)
{
if (pledge("stdio proc exec ptrace sigaction", nullptr) < 0) {
perror("pledge");
return 1;
}
Vector<const char*> child_argv;
const char* output_filename = nullptr;