summaryrefslogtreecommitdiffstats
path: root/source/a/bash/bash-5.1-patches/bash51-006
blob: dcabf8113b14477e0deceadcd2c4d962b5373859 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
			     BASH PATCH REPORT
			     =================

Bash-Release:	5.1
Patch-ID:	bash51-006

Bug-Reported-by:	oguzismailuysal@gmail.com
Bug-Reference-ID:	<CAH7i3LoY7C+pV_yG2LxwPNtAw3kiRkxmB4KcL1dTsih0u2BdKA@mail.gmail.com>
Bug-Reference-URL:	https://lists.gnu.org/archive/html/bug-bash/2020-12/msg00108.html

Bug-Description:

Make sure child processes forked to run command substitutions are in the
proper process group.

Patch (apply with `patch -p0'):

*** ../bash-5.1-patched/subst.c	2020-12-16 17:01:32.000000000 -0500
--- subst.c	2020-12-25 19:20:25.000000000 -0500
***************
*** 6413,6416 ****
--- 6413,6423 ----
        interactive = 0;
  
+ #if defined (JOB_CONTROL)
+       /* Invariant: in child processes started to run command substitutions,
+ 	 pipeline_pgrp == shell_pgrp. Other parts of the shell assume this. */
+       if (pipeline_pgrp > 0 && pipeline_pgrp != shell_pgrp)
+ 	shell_pgrp = pipeline_pgrp;
+ #endif
+ 
        set_sigint_handler ();	/* XXX */
  
*** ../bash-5.1/patchlevel.h	2020-06-22 14:51:03.000000000 -0400
--- patchlevel.h	2020-10-01 11:01:28.000000000 -0400
***************
*** 26,30 ****
     looks for to find the patch level (for the sccs version string). */
  
! #define PATCHLEVEL 5
  
  #endif /* _PATCHLEVEL_H_ */
--- 26,30 ----
     looks for to find the patch level (for the sccs version string). */
  
! #define PATCHLEVEL 6
  
  #endif /* _PATCHLEVEL_H_ */