1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-21 16:05:07 +00:00

Shell: Make Subshell actually create a subshell

Previously, a "subshell" would just be executed in the parent shell.
This commit is contained in:
AnotherTest 2020-12-14 23:09:17 +03:30 committed by Andreas Kling
parent 72bd672da0
commit 4668dfa7c7
3 changed files with 4 additions and 21 deletions

View file

@ -693,7 +693,7 @@ RefPtr<Job> Shell::run_command(const AST::Command& command)
return nullptr;
}
auto can_be_run_in_current_process = command.should_wait && !command.pipeline;
auto can_be_run_in_current_process = command.should_wait && !command.pipeline && !command.argv.is_empty();
if (can_be_run_in_current_process && has_function(command.argv.first())) {
SavedFileDescriptors fds { rewirings };