nalika / rpms / bash

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