summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChet Ramey <chet.ramey@case.edu>2013-03-07 15:20:58 -0500
committerChet Ramey <chet.ramey@case.edu>2013-03-07 15:20:58 -0500
commit43aebe922bc2a614c410e282fdf772e063454168 (patch)
treec49f4f0c2c960f89a8989a77e1e287457f311fe1
parent509a4430ae72aec10896713435e84f5b27675763 (diff)
downloadbash-43aebe922bc2a614c410e282fdf772e063454168.tar.gz
Bash-4.2 patch 43
-rw-r--r---i0
-rw-r--r--builtins/read.def16
-rw-r--r--patchlevel.h2
3 files changed, 14 insertions, 4 deletions
diff --git a/-i b/-i
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/-i
diff --git a/builtins/read.def b/builtins/read.def
index e32dec7b..d4078579 100644
--- a/builtins/read.def
+++ b/builtins/read.def
@@ -385,10 +385,20 @@ read_builtin (list)
{
/* Tricky. The top of the unwind-protect stack is the free of
input_string. We want to run all the rest and use input_string,
- so we have to remove it from the stack. */
- remove_unwind_protect ();
- run_unwind_frame ("read_builtin");
+ so we have to save input_string temporarily, run the unwind-
+ protects, then restore input_string so we can use it later. */
+
input_string[i] = '\0'; /* make sure it's terminated */
+ if (i == 0)
+ {
+ t = (char *)xmalloc (1);
+ t[0] = 0;
+ }
+ else
+ t = savestring (input_string);
+
+ run_unwind_frame ("read_builtin");
+ input_string = t;
retval = 128+SIGALRM;
goto assign_vars;
}
diff --git a/patchlevel.h b/patchlevel.h
index 10e294fb..4c2cf1dd 100644
--- a/patchlevel.h
+++ b/patchlevel.h
@@ -25,6 +25,6 @@
regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh
looks for to find the patch level (for the sccs version string). */
-#define PATCHLEVEL 42
+#define PATCHLEVEL 43
#endif /* _PATCHLEVEL_H_ */