perl/Module-Build-Tiny: update to 0.051 for Perl 5.36 and 5.38
[oi-userland.git] / components / shell / bash / patches / bash52-030.patch
blob20b8f244c648b6307ab72c80cd61e3ee814d086a
1 BASH PATCH REPORT
2 =================
4 Bash-Release: 5.2
5 Patch-ID: bash52-030
7 Bug-Reported-by: Steven Pelley <stevenpelley@gmail.com>
8 Bug-Reference-ID: <CAGOYURh6CKaE-D0Z8puP-tQknavCQNRHo02vpvgMQqaTG3_cRw@mail.gmail.com>
9 Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2024-01/msg00104.html
11 Bug-Description:
13 `wait -n' can fail to return some jobs if they exit due to signals the shell
14 does not report to the user.
16 Patch (apply with `patch -p0'):
18 *** ../bash-5.2-patched/jobs.c Thu Nov 9 14:59:14 2023
19 --- jobs.c Tue Jul 30 15:27:44 2024
20 ***************
21 *** 4275,4279 ****
22 ((DEADJOB (job) && IS_FOREGROUND (job) == 0) || STOPPED (job)))
23 continue;
25 /* If job control is disabled, don't print the status messages.
26 Mark dead jobs as notified so that they get cleaned up. If
27 --- 4288,4312 ----
28 ((DEADJOB (job) && IS_FOREGROUND (job) == 0) || STOPPED (job)))
29 continue;
31 ! /* Do the same thing and don't print anything or mark as notified
32 ! for the signals we're not going to report on. This is the opposite
33 ! of the first two cases under case JDEAD below. */
34 ! else if (interactive_shell == 0 && DEADJOB (job) && IS_FOREGROUND (job) == 0 &&
35 ! WIFSIGNALED (s) && (termsig == SIGINT
36 ! #if defined (DONT_REPORT_SIGTERM)
37 ! || termsig == SIGTERM
38 ! #endif
39 ! #if defined (DONT_REPORT_SIGPIPE)
40 ! || termsig == SIGPIPE
41 ! #endif
42 ! || signal_is_trapped (termsig)))
43 ! continue;
45 ! /* hang onto the status if the shell is running -c command */
46 ! else if (startup_state == 2 && subshell_environment == 0 &&
47 ! WIFSIGNALED (s) == 0 &&
48 ! ((DEADJOB (job) && IS_FOREGROUND (job) == 0) || STOPPED (job)))
49 ! continue;
51 /* If job control is disabled, don't print the status messages.
52 Mark dead jobs as notified so that they get cleaned up. If
53 ***************
54 *** 4298,4302 ****
55 /* Print info on jobs that are running in the background,
56 and on foreground jobs that were killed by anything
57 ! except SIGINT (and possibly SIGPIPE). */
58 switch (JOBSTATE (job))
60 --- 4331,4335 ----
61 /* Print info on jobs that are running in the background,
62 and on foreground jobs that were killed by anything
63 ! except SIGINT (and possibly SIGTERM and SIGPIPE). */
64 switch (JOBSTATE (job))
66 ***************
67 *** 4318,4321 ****
68 --- 4351,4355 ----
69 else if (IS_FOREGROUND (job))
71 + /* foreground jobs, interactive and non-interactive shells */
72 #if !defined (DONT_REPORT_SIGPIPE)
73 if (termsig && WIFSIGNALED (s) && termsig != SIGINT)
74 ***************
75 *** 4331,4337 ****
76 fprintf (stderr, "\n");
79 ! else if (job_control) /* XXX job control test added */
81 if (dir == 0)
82 dir = current_working_directory ();
83 --- 4365,4375 ----
84 fprintf (stderr, "\n");
86 + /* foreground jobs that exit cleanly */
87 + jobs[job]->flags |= J_NOTIFIED;
89 ! else if (job_control)
91 + /* background jobs with job control, interactive and
92 + non-interactive shells */
93 if (dir == 0)
94 dir = current_working_directory ();
95 ***************
96 *** 4342,4346 ****
99 ! jobs[job]->flags |= J_NOTIFIED;
100 break;
102 --- 4380,4391 ----
105 ! /* Interactive shells without job control enabled are handled
106 ! above. */
107 ! /* XXX - this is a catch-all in case we missed a state */
108 ! else
110 ! internal_debug("notify_of_job_status: catch-all setting J_NOTIFIED on job %d (%d), startup state = %d", job, jobs[job]->flags, startup_state);
111 ! jobs[job]->flags |= J_NOTIFIED;
113 break;
116 *** ../bash-5.2/patchlevel.h 2020-06-22 14:51:03.000000000 -0400
117 --- patchlevel.h 2020-10-01 11:01:28.000000000 -0400
118 ***************
119 *** 26,30 ****
120 looks for to find the patch level (for the sccs version string). */
122 ! #define PATCHLEVEL 29
124 #endif /* _PATCHLEVEL_H_ */
125 --- 26,30 ----
126 looks for to find the patch level (for the sccs version string). */
128 ! #define PATCHLEVEL 30
130 #endif /* _PATCHLEVEL_H_ */