summaryrefslogtreecommitdiffstats
path: root/bin/sh/eval.c
diff options
context:
space:
mode:
authorcracauer <cracauer@FreeBSD.org>1999-11-17 16:53:34 +0000
committercracauer <cracauer@FreeBSD.org>1999-11-17 16:53:34 +0000
commit82902b2e3cceb8850039864c750d3af934dbda3d (patch)
tree54aaa0c4a8b60f53007b5185fa0c25cdd27bdafa /bin/sh/eval.c
parent3d4886f969d5f39400eae578201519a3dfcfb1b8 (diff)
downloadFreeBSD-src-82902b2e3cceb8850039864c750d3af934dbda3d.zip
FreeBSD-src-82902b2e3cceb8850039864c750d3af934dbda3d.tar.gz
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.
Diffstat (limited to 'bin/sh/eval.c')
-rw-r--r--bin/sh/eval.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/sh/eval.c b/bin/sh/eval.c
index b1609fd..0699a66 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);
OpenPOWER on IntegriCloud