about summary refs log tree commit diff
diff options
context:
space:
mode:
authorBart Schaefer <barts@users.sourceforge.net>2012-11-18 18:27:18 +0000
committerBart Schaefer <barts@users.sourceforge.net>2012-11-18 18:27:18 +0000
commitdaa9e1fd5427285974295fe91e9c747b5db97fb6 (patch)
tree9b8e085972aa9417a96211056efb8d1acabc94dd
parentee040c6ba56a9ed22ed70cf429730cd59ed34954 (diff)
downloadzsh-daa9e1fd5427285974295fe91e9c747b5db97fb6.tar.gz
zsh-daa9e1fd5427285974295fe91e9c747b5db97fb6.tar.xz
zsh-daa9e1fd5427285974295fe91e9c747b5db97fb6.zip
users/17042: don't stomp the environment in "jobs -Z" unless we've first
copied it to new memory.
-rw-r--r--ChangeLog7
-rw-r--r--Src/jobs.c2
2 files changed, 8 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 9c1b39222..f9198cb98 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2012-11-18  Bart Schaefer  <schaefer@zsh.org>
+
+	* users/17042: Src/jobs.c: don't stomp the environment in "jobs -Z"
+	unless we've first copied it to new memory.
+
 2012-11-16  Oliver Kiddle <opk@zsh.org>
 
 	* 30802: Completion/Unix/Command/_find: add new command switches
@@ -348,5 +353,5 @@
 
 *****************************************************
 * This is used by the shell to define $ZSH_PATCHLEVEL
-* $Revision: 1.5762 $
+* $Revision: 1.5763 $
 *****************************************************
diff --git a/Src/jobs.c b/Src/jobs.c
index 0464d18d8..0dbb10b4f 100644
--- a/Src/jobs.c
+++ b/Src/jobs.c
@@ -1743,12 +1743,14 @@ init_jobs(char **argv, char **envp)
 	    goto done;
 	p = strchr(q, 0);
     }
+#if !defined(HAVE_PUTENV) && !defined(USE_SET_UNSET_ENV)
     for(; *envp; envp++) {
 	q = *envp;
 	if(q != p+1)
 	    goto done;
 	p = strchr(q, 0);
     }
+#endif
     done:
     hackspace = p - hackzero;
 #endif