summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/eval.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/eval.c b/src/eval.c
index 07e7ee2..fed82d5 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -625,8 +625,7 @@ evalbackcmd(union node *n, struct backcmd *result)
 			FORCEINTON;
 			close(pip[0]);
 			if (pip[1] != 1) {
-				close(1);
-				copyfd(pip[1], 1);
+				dup2(pip[1], 1);
 				close(pip[1]);
 			}
 			eflag = 0;