Skip to content

[FIX] Fix order of redirections for subshells#208

Merged
LeaYeh merged 3 commits intomainfrom
fix-issue-72
Mar 15, 2024
Merged

[FIX] Fix order of redirections for subshells#208
LeaYeh merged 3 commits intomainfrom
fix-issue-72

Conversation

@itislu
Copy link
Collaborator

@itislu itislu commented Mar 15, 2024

In the parser, instead of filling every simple cmd table with a redirect from outside of a subshell, fill the subshell start cmd table.
In the executor, the redirection gets then inherited to all child processes of the subshell.

@itislu itislu added the bug Something isn't working label Mar 15, 2024
@itislu itislu added this to the Parser milestone Mar 15, 2024
itislu added 3 commits March 15, 2024 14:24
Instead of filling every simple cmd table  with a redirect from outside of a subshell, fill the subshell start cmd table.
@LeaYeh LeaYeh merged commit 1b658e6 into main Mar 15, 2024
@LeaYeh LeaYeh deleted the fix-issue-72 branch March 15, 2024 13:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[KNOWN-ISSUE] Order of redirections is wrong for subshells in such a case: (echo 1 | cat > alt) > out

2 participants