7 Bug-Reported-by: Mike Frysinger <vapier@gentoo.org>
8 Bug-Reference-ID: <201104122356.20160.vapier@gentoo.org>
9 Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2011-04/msg00058.html
13 Bash did not correctly print/reproduce here documents attached to commands
14 inside compound commands such as arithmetic for loops and user-specified
15 subshells. This affected the execution of such commands inside a shell
16 function when the function definition is saved and later restored using
19 Patch (apply with `patch -p0'):
21 *** ../bash-4.2-patched/print_cmd.c 2010-05-30 18:34:08.000000000 -0400
22 --- print_cmd.c 2011-04-14 10:43:18.000000000 -0400
27 make_command_string_internal (command->value.Subshell->command);
28 + PRINT_DEFERRED_HEREDOCS ("");
34 indentation += indentation_amount;
35 make_command_string_internal (arith_for_command->action);
36 + PRINT_DEFERRED_HEREDOCS ("");
38 indentation -= indentation_amount;
43 make_command_string_internal (group_command->command);
44 + PRINT_DEFERRED_HEREDOCS ("");
46 if (inside_function_def)
47 *** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010
48 --- patchlevel.h Thu Feb 24 21:41:34 2011
51 looks for to find the patch level (for the sccs version string). */
53 ! #define PATCHLEVEL 9
55 #endif /* _PATCHLEVEL_H_ */
57 looks for to find the patch level (for the sccs version string). */
59 ! #define PATCHLEVEL 10
61 #endif /* _PATCHLEVEL_H_ */