7
Bug-Reported-by: Andrey Borzenkov <arvidjaar@gmail.com>
8
Bug-Reference-ID: <20121202205200.2134478e@opensuse.site>
9
Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2012-12/msg00008.html
13
Process substitution incorrectly inherited a flag that inhibited using the
14
(local) temporary environment for variable lookups if it was providing
15
the filename to a redirection. The intent the flag is to enforce the
16
Posix command expansion ordering rules.
18
Patch (apply with `patch -p0'):
20
Index: b/bash/patchlevel.h
21
===================================================================
22
--- a/bash/patchlevel.h
23
+++ b/bash/patchlevel.h
25
regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh
26
looks for to find the patch level (for the sccs version string). */
28
-#define PATCHLEVEL 40
29
+#define PATCHLEVEL 41
31
#endif /* _PATCHLEVEL_H_ */
33
===================================================================
36
@@ -5124,6 +5124,10 @@
37
dev_fd_list[parent_pipe_fd] = 0;
38
#endif /* HAVE_DEV_FD */
40
+ /* subshells shouldn't have this flag, which controls using the temporary
41
+ environment for variable lookups. */
42
+ expanding_redir = 0;
44
result = parse_and_execute (string, "process substitution", (SEVAL_NONINT|SEVAL_NOHIST));
46
#if !defined (HAVE_DEV_FD)