perl/Module-Build-Tiny: update to 0.051 for Perl 5.36 and 5.38
[oi-userland.git] / components / shell / bash / patches / bash52-019.patch
blob165a55e62c2398f476650c2e4319ffaae2097637
1 BASH PATCH REPORT
2 =================
4 Bash-Release: 5.2
5 Patch-ID: bash52-019
7 Bug-Reported-by: Steffen Nurpmeso <steffen@sdaoden.eu>
8 Bug-Reference-ID: <20230116233547.2jFxL%steffen@sdaoden.eu>
9 Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2023-01/msg00057.html
11 Bug-Description:
13 There are some cases where the shell reaped a background (asynchronous) job
14 and would incorrectly try to set the terminal's process group back to the
15 shell's. In these cases it never set the terminal process group to that
16 jobs's process group initially, so resetting it is incorrect.
18 Patch (apply with `patch -p0'):
20 *** ../bash-5.2-patched/jobs.c 2022-12-13 12:09:02.000000000 -0500
21 --- jobs.c 2023-10-26 12:12:10.000000000 -0400
22 ***************
23 *** 3078,3084 ****
24 subshell. Make sure subst.c:command_substitute uses the same
25 conditions to determine whether or not it should undo this and
26 ! give the terminal to pipeline_pgrp. */
28 if ((flags & JWAIT_NOTERM) == 0 && running_in_background == 0 &&
29 (subshell_environment & (SUBSHELL_ASYNC|SUBSHELL_PIPE)) == 0)
30 give_terminal_to (shell_pgrp, 0);
31 --- 3036,3046 ----
32 subshell. Make sure subst.c:command_substitute uses the same
33 conditions to determine whether or not it should undo this and
34 ! give the terminal to pipeline_pgrp. We don't give the terminal
35 ! back to shell_pgrp if an async job in the background exits because
36 ! we never gave it to that job in the first place. An async job in
37 ! the foreground is one we started in the background and foregrounded
38 ! with `fg', and gave it the terminal. */
39 if ((flags & JWAIT_NOTERM) == 0 && running_in_background == 0 &&
40 + (job == NO_JOB || IS_ASYNC (job) == 0 || IS_FOREGROUND (job)) &&
41 (subshell_environment & (SUBSHELL_ASYNC|SUBSHELL_PIPE)) == 0)
42 give_terminal_to (shell_pgrp, 0);
43 ***************
44 *** 3624,3627 ****
45 --- 3599,3603 ----
46 get_tty_state ();
47 save_stty = shell_tty_info;
48 + jobs[job]->flags &= ~J_ASYNC; /* no longer async */
49 /* Give the terminal to this job. */
50 if (IS_JOBCONTROL (job))
52 *** ../bash-5.2/patchlevel.h 2020-06-22 14:51:03.000000000 -0400
53 --- patchlevel.h 2020-10-01 11:01:28.000000000 -0400
54 ***************
55 *** 26,30 ****
56 looks for to find the patch level (for the sccs version string). */
58 ! #define PATCHLEVEL 18
60 #endif /* _PATCHLEVEL_H_ */
61 --- 26,30 ----
62 looks for to find the patch level (for the sccs version string). */
64 ! #define PATCHLEVEL 19
66 #endif /* _PATCHLEVEL_H_ */