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

Shell: Moves pipelined processes to one process group

This commit is contained in:
AnotherTest 2020-08-11 15:54:46 +04:30 committed by Andreas Kling
parent 8a17527bc5
commit ab3e787334
6 changed files with 44 additions and 11 deletions

View file

@ -1142,6 +1142,14 @@ RefPtr<Value> Pipe::run(RefPtr<Shell> shell)
last_in_left.should_wait = false;
last_in_left.is_pipe_source = true;
if (first_in_right.pipeline) {
last_in_left.pipeline = first_in_right.pipeline;
} else {
auto pipeline = adopt(*new Pipeline);
last_in_left.pipeline = pipeline;
first_in_right.pipeline = pipeline;
}
Vector<Command> commands;
commands.append(left);
commands.append(last_in_left);