svashisht / rpms / bash

Forked from rpms/bash 4 years ago
Clone

Blame SOURCES/bash-4.4-pipeline-pgrp.patch

ff19ae
diff --git a/subst.c b/subst.c
ff19ae
index 1dbfb5e..049962e 100644
ff19ae
--- a/subst.c
ff19ae
+++ b/subst.c
ff19ae
@@ -5011,7 +5011,8 @@ process_substitute (string, open_for_read_in_child)
ff19ae
 
ff19ae
 #if defined (JOB_CONTROL)
ff19ae
   old_pipeline_pgrp = pipeline_pgrp;
ff19ae
-  pipeline_pgrp = shell_pgrp;
ff19ae
+  if (pipeline_pgrp == 0 || (subshell_environment & (SUBSHELL_PIPE|SUBSHELL_FORK|SUBSHELL_ASYNC)) == 0)
ff19ae
+    pipeline_pgrp = shell_pgrp;
ff19ae
   save_pipeline (1);
ff19ae
 #endif /* JOB_CONTROL */
ff19ae
 
ff19ae
-- 
ff19ae
2.9.3
ff19ae