Blame SOURCES/bash-5.1-patch-3.patch

bb9a7e
diff --git a/patchlevel.h b/patchlevel.h
bb9a7e
--- a/patchlevel.h
bb9a7e
+++ b/patchlevel.h
bb9a7e
@@ -25,6 +25,6 @@
bb9a7e
    regexp `^#define[ 	]*PATCHLEVEL', since that's what support/mkversion.sh
bb9a7e
    looks for to find the patch level (for the sccs version string). */
bb9a7e
 
bb9a7e
-#define PATCHLEVEL 2
bb9a7e
+#define PATCHLEVEL 3
bb9a7e
 
bb9a7e
 #endif /* _PATCHLEVEL_H_ */
bb9a7e
diff --git a/subst.c b/subst.c
bb9a7e
--- a/subst.c
bb9a7e
+++ b/subst.c
bb9a7e
@@ -6356,8 +6356,10 @@ command_substitute (string, quoted, flags)
bb9a7e
 
bb9a7e
 #if defined (JOB_CONTROL)
bb9a7e
   old_pipeline_pgrp = pipeline_pgrp;
bb9a7e
-  /* Don't reset the pipeline pgrp if we're already a subshell in a pipeline. */
bb9a7e
-  if ((subshell_environment & SUBSHELL_PIPE) == 0)
bb9a7e
+  /* Don't reset the pipeline pgrp if we're already a subshell in a pipeline or
bb9a7e
+     we've already forked to run a disk command (and are expanding redirections,
bb9a7e
+     for example). */
bb9a7e
+  if ((subshell_environment & (SUBSHELL_FORK|SUBSHELL_PIPE)) == 0)
bb9a7e
     pipeline_pgrp = shell_pgrp;
bb9a7e
   cleanup_the_pipeline ();
bb9a7e
 #endif /* JOB_CONTROL */