mirror of
https://github.com/RGBCube/serenity
synced 2025-05-23 18:55:08 +00:00
Shell: Separate fd rewirings from redirections.
This was unnecessarily confusing. When we build up a chain of commands connected by pipes, we now store the file descriptors of each end of these pipes as rewirings in a vector. The rewirings are then put into effect by calls to dup2().
This commit is contained in:
parent
59dae9a766
commit
848044b74c
3 changed files with 19 additions and 18 deletions
|
@ -19,7 +19,7 @@ void Parser::commit_subcommand()
|
|||
{
|
||||
if (m_tokens.is_empty())
|
||||
return;
|
||||
m_subcommands.append({ move(m_tokens), move(m_redirections) });
|
||||
m_subcommands.append({ move(m_tokens), move(m_redirections), {} });
|
||||
}
|
||||
|
||||
void Parser::do_pipe()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue