From 217eca3d3f1a37af0256f938544797cfd6760732 Mon Sep 17 00:00:00 2001 From: AnotherTest Date: Sat, 15 Aug 2020 20:31:53 +0430 Subject: [PATCH] Shell: Name the pipe ends correctly --- Shell/AST.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Shell/AST.cpp b/Shell/AST.cpp index d82ca6834c..803e207e8e 100644 --- a/Shell/AST.cpp +++ b/Shell/AST.cpp @@ -1135,10 +1135,10 @@ RefPtr Pipe::run(RefPtr shell) auto last_in_left = left.take_last(); auto first_in_right = right.take_first(); - auto pipe_write_end = FdRedirection::create(STDIN_FILENO, -1, Rewiring::Close::Destination); - auto pipe_read_end = FdRedirection::create(STDOUT_FILENO, -1, pipe_write_end, Rewiring::Close::RefreshDestination); - first_in_right.redirections.append(pipe_write_end); - last_in_left.redirections.append(pipe_read_end); + auto pipe_read_end = FdRedirection::create(STDIN_FILENO, -1, Rewiring::Close::Destination); + auto pipe_write_end = FdRedirection::create(STDOUT_FILENO, -1, pipe_read_end, Rewiring::Close::RefreshDestination); + first_in_right.redirections.append(pipe_read_end); + last_in_left.redirections.append(pipe_write_end); last_in_left.should_wait = false; last_in_left.is_pipe_source = true;