mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 00:07:36 +00:00
Terminal: Drop "proc" and "exec" pledges after initializing
We shouldn't need these once we've got the shell process running. :^)
This commit is contained in:
parent
57a345a590
commit
dea0d22ab3
1 changed files with 7 additions and 1 deletions
|
@ -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.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
@ -518,6 +518,12 @@ int main(int argc, char** argv)
|
||||||
unveil(nullptr, nullptr);
|
unveil(nullptr, nullptr);
|
||||||
|
|
||||||
config->sync();
|
config->sync();
|
||||||
|
|
||||||
|
if (pledge("stdio tty rpath accept cpath wpath recvfd sendfd unix", nullptr) < 0) {
|
||||||
|
perror("pledge");
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
int result = app->exec();
|
int result = app->exec();
|
||||||
dbgln("Exiting terminal, updating utmp");
|
dbgln("Exiting terminal, updating utmp");
|
||||||
utmp_update(pts_name, 0, false);
|
utmp_update(pts_name, 0, false);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue