Bash-4.0 patchlevel 38

This commit is contained in:
Chet Ramey
2011-11-21 20:49:12 -05:00
parent 17345e5ad2
commit 89a92869e5
27 changed files with 490 additions and 164 deletions
+12 -8
View File
@@ -369,14 +369,14 @@ read_builtin (list)
code = setjmp (alrmbuf);
if (code)
{
#if 0
/* 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");
return (EXECUTION_FAILURE);
#else
input_string[i] = '\0'; /* make sure it's terminated */
retval = 128+SIGALRM;;
retval = 128+SIGALRM;
goto assign_vars;
#endif
}
old_alrm = set_signal_handler (SIGALRM, sigalrm);
add_unwind_protect (reset_alarm, (char *)NULL);
@@ -601,14 +601,15 @@ add_char:
if (unbuffered_read == 0)
zsyncfd (fd);
interrupt_immediately--;
terminate_immediately--;
discard_unwind_frame ("read_builtin");
retval = eof ? EXECUTION_FAILURE : EXECUTION_SUCCESS;
assign_vars:
interrupt_immediately--;
terminate_immediately--;
#if defined (ARRAY_VARS)
/* If -a was given, take the string read, break it into a list of words,
an assign them to `arrayname' in turn. */
@@ -763,7 +764,10 @@ assign_vars:
if (*input_string == 0)
tofree = input_string = t;
else
input_string = strip_trailing_ifs_whitespace (t1, ifs_chars, saw_escape);
{
input_string = strip_trailing_ifs_whitespace (t1, ifs_chars, saw_escape);
tofree = t;
}
}
#endif