1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 00:27:43 +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:
Andreas Kling 2021-02-16 13:35:04 +01:00
parent 57a345a590
commit dea0d22ab3

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
@ -518,6 +518,12 @@ int main(int argc, char** argv)
unveil(nullptr, nullptr);
config->sync();
if (pledge("stdio tty rpath accept cpath wpath recvfd sendfd unix", nullptr) < 0) {
perror("pledge");
return 1;
}
int result = app->exec();
dbgln("Exiting terminal, updating utmp");
utmp_update(pts_name, 0, false);