blob: 72c251b98707d8447a41c66ce5c4d5eb80d91ceb [file] [log] [blame]
b.liue9582032025-04-17 19:18:16 +08001 BASH PATCH REPORT
2 =================
3
4Bash-Release: 5.1
5Patch-ID: bash51-003
6
7Bug-Reported-by: oguzismailuysal@gmail.com
8Bug-Reference-ID: <CAH7i3LpG91BnNcDtaTUm2Ph7a+PnJkuh6nAc87cVL7_38tOaMQ@mail.gmail.com>
9Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2020-12/msg00050.html
10
11Bug-Description:
12
13Bash does not put a command substitution process that is started to perform an
14expansion in a child process into the right process group where it can receive
15keyboard-generated signals.
16
17Patch (apply with `patch -p0'):
18
19--- a/subst.c
20+++ b/subst.c
21@@ -6356,8 +6356,10 @@ command_substitute (string, quoted, flag
22
23 #if defined (JOB_CONTROL)
24 old_pipeline_pgrp = pipeline_pgrp;
25- /* Don't reset the pipeline pgrp if we're already a subshell in a pipeline. */
26- if ((subshell_environment & SUBSHELL_PIPE) == 0)
27+ /* Don't reset the pipeline pgrp if we're already a subshell in a pipeline or
28+ we've already forked to run a disk command (and are expanding redirections,
29+ for example). */
30+ if ((subshell_environment & (SUBSHELL_FORK|SUBSHELL_PIPE)) == 0)
31 pipeline_pgrp = shell_pgrp;
32 cleanup_the_pipeline ();
33 #endif /* JOB_CONTROL */
34--- a/patchlevel.h
35+++ b/patchlevel.h
36@@ -25,6 +25,6 @@
37 regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh
38 looks for to find the patch level (for the sccs version string). */
39
40-#define PATCHLEVEL 2
41+#define PATCHLEVEL 3
42
43 #endif /* _PATCHLEVEL_H_ */