mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 07:57:46 +00:00
Userland: Remove unecessary uses of __serenity__ macro
This commit is contained in:
parent
828441852f
commit
539fb08551
10 changed files with 4 additions and 51 deletions
|
@ -877,13 +877,11 @@ ErrorOr<RefPtr<Job>> Shell::run_command(const AST::Command& command)
|
|||
|
||||
void Shell::execute_process(Vector<char const*>&& argv)
|
||||
{
|
||||
#ifdef __serenity__
|
||||
for (auto& promise : m_active_promises) {
|
||||
pledge("stdio rpath exec", promise.data.exec_promises.characters());
|
||||
MUST(Core::System::pledge("stdio rpath exec"sv, promise.data.exec_promises));
|
||||
for (auto& item : promise.data.unveils)
|
||||
unveil(item.path.characters(), item.access.characters());
|
||||
MUST(Core::System::unveil(item.path, item.access));
|
||||
}
|
||||
#endif
|
||||
|
||||
int rc = execvp(argv[0], const_cast<char* const*>(argv.data()));
|
||||
if (rc < 0) {
|
||||
|
|
|
@ -41,9 +41,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
s_shell->editor()->save_history(s_shell->get_history_path());
|
||||
});
|
||||
|
||||
#ifdef __serenity__
|
||||
TRY(Core::System::pledge("stdio rpath wpath cpath proc exec tty sigaction unix fattr"));
|
||||
#endif
|
||||
|
||||
RefPtr<::Shell::Shell> shell;
|
||||
bool attempt_interactive = false;
|
||||
|
@ -57,13 +55,6 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
|
||||
s_shell->setup_signals();
|
||||
|
||||
#ifndef __serenity__
|
||||
sigset_t blocked;
|
||||
sigemptyset(&blocked);
|
||||
sigaddset(&blocked, SIGTTOU);
|
||||
sigaddset(&blocked, SIGTTIN);
|
||||
pthread_sigmask(SIG_BLOCK, &blocked, nullptr);
|
||||
#endif
|
||||
shell->termios = editor->termios();
|
||||
shell->default_termios = editor->default_termios();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue