1 Star 0 Fork 34

src-oepkgs-oE-rv / bash

forked from src-openEuler / bash 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
backport-Bash-5.1-patch-3-fix-command-substitution-in-here-do.patch 1.40 KB
一键复制 编辑 原始数据 按行查看 历史
JeanLeo 提交于 2021-06-18 10:12 . add upstream patches
From a042c731eecd6c6f5c488fa3187af28b18a6c905 Mon Sep 17 00:00:00 2001
From: Chet Ramey <chet.ramey@case.edu>
Date: Sat, 19 Dec 2020 14:29:01 -0500
Subject: [PATCH] Bash-5.1 patch 3: fix command substitution in here-document
from child process in wrong process group
---
patchlevel.h | 2 +-
subst.c | 6 ++++--
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/patchlevel.h b/patchlevel.h
index 8a183551..e4d85cf8 100644
--- a/patchlevel.h
+++ b/patchlevel.h
@@ -25,6 +25,6 @@
regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh
looks for to find the patch level (for the sccs version string). */
-#define PATCHLEVEL 2
+#define PATCHLEVEL 3
#endif /* _PATCHLEVEL_H_ */
diff --git a/subst.c b/subst.c
index 9ccbf336..23f847f4 100644
--- a/subst.c
+++ b/subst.c
@@ -6356,8 +6356,10 @@ command_substitute (string, quoted, flags)
#if defined (JOB_CONTROL)
old_pipeline_pgrp = pipeline_pgrp;
- /* Don't reset the pipeline pgrp if we're already a subshell in a pipeline. */
- if ((subshell_environment & SUBSHELL_PIPE) == 0)
+ /* Don't reset the pipeline pgrp if we're already a subshell in a pipeline or
+ we've already forked to run a disk command (and are expanding redirections,
+ for example). */
+ if ((subshell_environment & (SUBSHELL_FORK|SUBSHELL_PIPE)) == 0)
pipeline_pgrp = shell_pgrp;
cleanup_the_pipeline ();
#endif /* JOB_CONTROL */
--
2.27.0
1
https://gitee.com/src-oepkgs-oe-rv/bash.git
git@gitee.com:src-oepkgs-oe-rv/bash.git
src-oepkgs-oe-rv
bash
bash
master

搜索帮助