b.liu | e958203 | 2025-04-17 19:18:16 +0800 | [diff] [blame^] | 1 | BASH PATCH REPORT |
| 2 | ================= |
| 3 | |
| 4 | Bash-Release: 5.1 |
| 5 | Patch-ID: bash51-003 |
| 6 | |
| 7 | Bug-Reported-by: oguzismailuysal@gmail.com |
| 8 | Bug-Reference-ID: <CAH7i3LpG91BnNcDtaTUm2Ph7a+PnJkuh6nAc87cVL7_38tOaMQ@mail.gmail.com> |
| 9 | Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2020-12/msg00050.html |
| 10 | |
| 11 | Bug-Description: |
| 12 | |
| 13 | Bash does not put a command substitution process that is started to perform an |
| 14 | expansion in a child process into the right process group where it can receive |
| 15 | keyboard-generated signals. |
| 16 | |
| 17 | Patch (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_ */ |