diff options
author | Peter Stephenson <pws@zsh.org> | 2015-07-23 09:34:11 +0100 |
---|---|---|
committer | Peter Stephenson <pws@zsh.org> | 2015-07-23 09:34:11 +0100 |
commit | 28a962f557952a6001d37f4f4f7034361d11bf89 (patch) | |
tree | 619000f12f12992f4521e99c05d170b235e6bfb2 /Test/D03procsubst.ztst | |
parent | 49ff2e00dc3787b3575f392f53d90774f1dbbdce (diff) | |
download | zsh-28a962f557952a6001d37f4f4f7034361d11bf89.tar.gz zsh-28a962f557952a6001d37f4f4f7034361d11bf89.tar.xz zsh-28a962f557952a6001d37f4f4f7034361d11bf89.zip |
35849: close fd's from process substitution after fork
Leaving these hanging in parent could cause deadlock: test added.
Diffstat (limited to 'Test/D03procsubst.ztst')
-rw-r--r-- | Test/D03procsubst.ztst | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Test/D03procsubst.ztst b/Test/D03procsubst.ztst index 7b8758901..9ab67c2b4 100644 --- a/Test/D03procsubst.ztst +++ b/Test/D03procsubst.ztst @@ -126,3 +126,18 @@ eval 'foo here is some output)' 0:full alias expanded when substitution starts in alias >here is some output + + if ! (mkfifo test_pipe >/dev/null 2>&1); then + ZTST_skip="mkfifo not available" + else + echo 1 | tee >(cat > test_pipe) | (){ + local pipein + read pipein <test_pipe + print $pipein + read pipein + print $pipein + } + fi +0:proc subst fd in forked subshell closed in parent +>1 +>1 |