mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 05:17:35 +00:00
Terminal: Use pledge()
This commit is contained in:
parent
b36608f47c
commit
4132f713c8
1 changed files with 10 additions and 0 deletions
|
@ -136,6 +136,11 @@ RefPtr<GWindow> create_settings_window(TerminalWidget& terminal, RefPtr<CConfigF
|
||||||
|
|
||||||
int main(int argc, char** argv)
|
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;
|
struct sigaction act;
|
||||||
memset(&act, 0, sizeof(act));
|
memset(&act, 0, sizeof(act));
|
||||||
act.sa_flags = SA_NOCLDWAIT;
|
act.sa_flags = SA_NOCLDWAIT;
|
||||||
|
@ -148,6 +153,11 @@ int main(int argc, char** argv)
|
||||||
|
|
||||||
GApplication app(argc, 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");
|
CArgsParser args_parser("Terminal");
|
||||||
|
|
||||||
args_parser.add_arg("e", "execute", "Execute this command inside the terminal.");
|
args_parser.add_arg("e", "execute", "Execute this command inside the terminal.");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue