about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--Doc/Zsh/expn.yo2
-rw-r--r--Src/exec.c7
3 files changed, 11 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index e3e902d1c..fede2f8e1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2008-11-17  Peter Stephenson  <pws@csr.com>
 
+	* 26056: Doc/Zsh/expn.yo, Src/exec.c:  < <(...)more_stuff is
+	an error and similarly for > >(...)yet_more_stuff.
+
 	* 26055: README, Doc/Zsh/expn.yo, Src/subst.c: ensure process
 	substitution is handled completely before parameter and
 	command substitution.
diff --git a/Doc/Zsh/expn.yo b/Doc/Zsh/expn.yo
index 2e5af790c..ec92a34b9 100644
--- a/Doc/Zsh/expn.yo
+++ b/Doc/Zsh/expn.yo
@@ -362,6 +362,8 @@ or followed by other strings except that, to prevent clashes with
 commonly occurring strings and patterns, the last
 form must occur at the start of a command argument, and the forms
 are only expanded when first parsing command or assignment arguments.
+Process substitutions may be used following redirection operators; in this
+case, the substitution must appear with no trailing string.
 
 In the case of the tt(<) or tt(>) forms, the shell runs the commands in
 var(list) asynchronously.  If the system supports the tt(/dev/fd)
diff --git a/Src/exec.c b/Src/exec.c
index a398211d3..5aec655a2 100644
--- a/Src/exec.c
+++ b/Src/exec.c
@@ -3773,9 +3773,14 @@ getpipe(char *cmd, int nullexec)
     int pipes[2], out = *cmd == Inang;
     pid_t pid;
     struct timeval bgtime;
+    char *ends;
 
-    if (!(prog = parsecmd(cmd, NULL)))
+    if (!(prog = parsecmd(cmd, &ends)))
 	return -1;
+    if (*ends) {
+	zerr("invalid syntax for process substitution in redirection");
+	return -1;
+    }
     mpipe(pipes);
     if ((pid = zfork(&bgtime))) {
 	zclose(pipes[out]);