7 Bug-Reported-by: Mike Frysinger <vapier@gentoo.org>
8 Bug-Reference-ID: <201003210155.56618.vapier@gentoo.org>
9 Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2010-03/msg00063.html
13 Bash did not correctly print/reproduce here documents attached to commands
14 inside compound commands such as for and while. This affected the
15 execution of such commands inside a shell function when the function
16 definition is saved and later restored using `.' or `eval'.
18 Patch (apply with `patch -p0'):
20 *** ../bash-4.1-patched/print_cmd.c 2009-09-16 15:32:26.000000000 -0400
21 --- print_cmd.c 2010-03-22 21:15:30.000000000 -0400
25 #define CHECK_XTRACE_FP xtrace_fp = (xtrace_fp ? xtrace_fp : stderr)
27 + #define PRINT_DEFERRED_HEREDOCS(x) \
29 + if (deferred_heredocs) \
30 + print_deferred_heredocs (x); \
33 /* Non-zero means the stuff being printed is inside of a function def. */
34 static int inside_function_def;
38 print_for_command_head (for_command);
42 indentation += indentation_amount;
43 make_command_string_internal (for_command->action);
45 indentation -= indentation_amount;
50 print_for_command_head (for_command);
54 indentation += indentation_amount;
55 make_command_string_internal (for_command->action);
56 + PRINT_DEFERRED_HEREDOCS ("");
58 indentation -= indentation_amount;
62 *** ../bash-4.1-patched/patchlevel.h 2009-10-01 16:39:22.000000000 -0400
63 --- patchlevel.h 2010-01-14 09:38:08.000000000 -0500
66 looks for to find the patch level (for the sccs version string). */
68 ! #define PATCHLEVEL 5
70 #endif /* _PATCHLEVEL_H_ */
72 looks for to find the patch level (for the sccs version string). */
74 ! #define PATCHLEVEL 6
76 #endif /* _PATCHLEVEL_H_ */