From 6d9efc2432ee9582ada3d30fd5ff34d95434fa0c Mon Sep 17 00:00:00 2001 From: Martin Cracauer Date: Wed, 17 Nov 1999 16:53:34 +0000 Subject: [PATCH] The pipleline problem introduced in version 1.22 wasn't fully fixed in 1.23. This revision should work for long pipes both in here-documents/backquote and in normal cases. Fix works for jmz, bde. --- bin/sh/eval.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/sh/eval.c b/bin/sh/eval.c index b1609fd1f93..0699a669839 100644 --- a/bin/sh/eval.c +++ b/bin/sh/eval.c @@ -499,7 +499,7 @@ evalpipe(n) close(prevfd); } if (pip[1] >= 0) { - if (prevfd < 0) + if (!(prevfd >= 0 && pip[0] == 0)) close(pip[0]); if (pip[1] != 1) { close(1);