1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-01-31 03:04:49 +01:00

26056 "< <(...)more_stuff" etc. are errors

This commit is contained in:
Peter Stephenson 2008-11-17 16:56:41 +00:00
parent 2fbc131ca8
commit 0d0e497c69
3 changed files with 11 additions and 1 deletions

View file

@ -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.

View file

@ -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)

View file

@ -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]);