1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-09-26 18:01:03 +02:00

39517: back off 39502 (WC_ASSIGN causes fork in pipe).

This isn't a robust fix as WC_ASSIGNs simply precede the main wordcode.
This commit is contained in:
Peter Stephenson 2016-09-30 11:34:15 +01:00
parent d08674ef8c
commit bb2bbcc944
3 changed files with 12 additions and 7 deletions

View file

@ -1,5 +1,7 @@
2016-09-30 Peter Stephenson <p.stephenson@samsung.com> 2016-09-30 Peter Stephenson <p.stephenson@samsung.com>
* 39517: back off 39502, this isn't a robust fix.
* 39498: Src/parmas.c,Src/zsh.h: use PRIVILEGED option to * 39498: Src/parmas.c,Src/zsh.h: use PRIVILEGED option to
decide on problematic parameter imports. decide on problematic parameter imports.

View file

@ -1844,7 +1844,7 @@ execpline2(Estate state, wordcode pcode,
/* if we are doing "foo | bar" where foo is a current * /* if we are doing "foo | bar" where foo is a current *
* shell command, do foo in a subshell and do the * * shell command, do foo in a subshell and do the *
* rest of the pipeline in the current shell. */ * rest of the pipeline in the current shell. */
if ((wc_code(code) >= WC_CURSH || wc_code(code) == WC_ASSIGN) if ((wc_code(code) >= WC_CURSH)
&& (how & Z_SYNC)) { && (how & Z_SYNC)) {
int synch[2]; int synch[2];
struct timeval bgtime; struct timeval bgtime;

View file

@ -757,9 +757,12 @@
>} >}
>Stuff here >Stuff here
x=1 ## This problem is hard to fix without significant changes to how
x=2 | echo $x ## the shell forks for a pipeline.
echo $x #
0:Assignment-only current shell commands in LHS of pipelin # x=1
>1 # x=2 | echo $x
>1 # echo $x
# 0:Assignment-only current shell commands in LHS of pipelin
# >1
# >1