summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog21
-rw-r--r--Config/version.mk4
-rw-r--r--Doc/Zsh/jobs.yo16
-rw-r--r--Etc/FAQ.yo2
-rw-r--r--README2
-rw-r--r--Src/subst.c7
-rw-r--r--Test/D04parameter.ztst5
7 files changed, 48 insertions, 9 deletions
diff --git a/ChangeLog b/ChangeLog
index 40036c470..f00df2b5b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
+2012-02-23 Peter Stephenson <p.w.stephenson@ntlworld.com>
+
+ * unposted: 4.3.17.
+
+2012-02-22 Peter Stephenson <pws@csr.com>
+
+ * 30238 with small fixes: Doc/Zsh/jobs.yo: document the fork
+ behaviour on suspending complex builtin execution.
+
+2012-02-20 Barton E. Schaefer <schaefer@zsh.org>
+
+ * 30242: Src/subst.c, Test/D05parameter.ztst: use PREFORK_SINGLE
+ for the right-hand side of ${...=...} when SH_WORD_SPLIT is in
+ effect (POSIX emulation).
+
2012-02-19 Peter Stephenson <p.w.stephenson@ntlworld.com>
* unposted: Etc/Config.yo, Completion/X/Type/.distfiles,
@@ -67,8 +82,8 @@
2012-02-09 Barton E. Schaefer <schaefer@zsh.org>
- * 30193: ChangeLog Src/Zle/compcore.c: remnulargs() after poking
- into string in case length changes.
+ * 30193: Src/Zle/compcore.c: remnulargs() after poking into string
+ in case length changes.
2012-02-08 Peter Stephenson <pws@csr.com>
@@ -15995,5 +16010,5 @@
*****************************************************
* This is used by the shell to define $ZSH_PATCHLEVEL
-* $Revision: 1.5590 $
+* $Revision: 1.5594 $
*****************************************************
diff --git a/Config/version.mk b/Config/version.mk
index 38715c29d..2035929f4 100644
--- a/Config/version.mk
+++ b/Config/version.mk
@@ -27,5 +27,5 @@
# This must also serve as a shell script, so do not add spaces around the
# `=' signs.
-VERSION=4.3.16
-VERSION_DATE='February 19, 2011'
+VERSION=4.3.17
+VERSION_DATE='February 22, 2011'
diff --git a/Doc/Zsh/jobs.yo b/Doc/Zsh/jobs.yo
index 0369e9745..3baf77f20 100644
--- a/Doc/Zsh/jobs.yo
+++ b/Doc/Zsh/jobs.yo
@@ -37,6 +37,22 @@ when it is typed.
A job being run in the background will suspend if it tries to read
from the terminal.
+
+Note that if the job running in the foreground is a shell function,
+then suspending it will have the effect of causing the shell to fork.
+This is necessary to separate the function's state from that of the
+parent shell performing the job control, so that the latter can return
+to the command line prompt. As a result, even if tt(fg) is
+used to continue the job the function will no longer be part of the
+parent shell, and any variables set by the function will not be visible
+in the parent shell. Thus the behaviour is different from the case
+where the function was never suspended. Zsh is different from many
+other shells in this regard.
+
+The same behaviour is found when the shell is executing code as the
+right hand side of a pipeline or any complex shell construct such as
+tt(if), tt(for), etc., in order that the entire block of code
+can be managed as a single job.
cindex(background jobs, I/O)
cindex(jobs, background, I/O)
Background jobs are normally allowed to produce output,
diff --git a/Etc/FAQ.yo b/Etc/FAQ.yo
index 4036e8d1e..ee79a6ac4 100644
--- a/Etc/FAQ.yo
+++ b/Etc/FAQ.yo
@@ -302,7 +302,7 @@ sect(On what machines will it run?)
sect(What's the latest version?)
Zsh 4.2.7 is the latest production version. The latest development
- version is 4.3.16; this contains support for multibyte character strings
+ version is 4.3.17; this contains support for multibyte character strings
(such as UTF-8 locales). All the main features for multibyte
support are now in place and this is likely soon to become the
stable series 5.0.
diff --git a/README b/README
index 8b7c91134..513732f16 100644
--- a/README
+++ b/README
@@ -5,7 +5,7 @@ THE Z SHELL (ZSH)
Version
-------
-This is version 4.3.16 of the shell. This is a development release,
+This is version 4.3.17 of the shell. This is a development release,
but is believed to be reasonably stable. Sites where the users need to
edit command lines with multibyte characters (in particular UTF-8)
will probably want to upgrade. The previous widely released version
diff --git a/Src/subst.c b/Src/subst.c
index 894f9cd2f..b9229861b 100644
--- a/Src/subst.c
+++ b/Src/subst.c
@@ -2693,7 +2693,12 @@ paramsubst(LinkList l, LinkNode n, char **str, int qt, int pf_flags)
*idend = '\0';
val = dupstring(s);
if (spsep || !arrasg) {
- multsub(&val, PREFORK_NOSHWORDSPLIT, NULL, &isarr, NULL);
+ /* POSIX requires PREFORK_SINGLE semantics here, but
+ * traditional zsh used PREFORK_NOSHWORDSPLIT. Base
+ * behavior on caller choice of PREFORK_SHWORDSPLIT. */
+ multsub(&val,
+ spbreak ? PREFORK_SINGLE : PREFORK_NOSHWORDSPLIT,
+ NULL, &isarr, NULL);
} else {
if (spbreak)
split_flags = PREFORK_SPLIT|PREFORK_SHWORDSPLIT;
diff --git a/Test/D04parameter.ztst b/Test/D04parameter.ztst
index 69606e453..7eb721226 100644
--- a/Test/D04parameter.ztst
+++ b/Test/D04parameter.ztst
@@ -264,10 +264,13 @@
done
}
test_split_var=
- : ${test_split_var:=$(test_splitting)}
+ echo _${test_split_var:=$(test_splitting)}_
echo "_${test_split_var}_")
0:SH_WORD_SPLIT inside $(...) inside ${...}
>_'one' 'two' 'three'_
+>_'one'
+>'two'
+>'three'_
print -l "${(f)$(print first line\\nsecond line\\nthird line)}"
0:${(f)$(...)}