1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 15:57:35 +00:00

Terminal: Use pledge()

This commit is contained in:
Andreas Kling 2020-01-11 21:07:18 +01:00
parent b36608f47c
commit 4132f713c8

View file

@ -136,6 +136,11 @@ RefPtr<GWindow> create_settings_window(TerminalWidget& terminal, RefPtr<CConfigF
int main(int argc, char** argv)
{
if (pledge("stdio tty rpath cpath wpath shared_buffer proc unix fattr", nullptr) < 0) {
perror("pledge");
return 1;
}
struct sigaction act;
memset(&act, 0, sizeof(act));
act.sa_flags = SA_NOCLDWAIT;
@ -148,6 +153,11 @@ int main(int argc, char** argv)
GApplication app(argc, argv);
if (pledge("stdio tty rpath cpath wpath shared_buffer proc unix", nullptr) < 0) {
perror("pledge");
return 1;
}
CArgsParser args_parser("Terminal");
args_parser.add_arg("e", "execute", "Execute this command inside the terminal.");