blob: 2faa88189147c1572825fbc6474aa7f05203f6ba [file] [log] [blame]
b.liue9582032025-04-17 19:18:16 +08001 BASH PATCH REPORT
2 =================
3
4Bash-Release: 5.1
5Patch-ID: bash51-002
6
7Bug-Reported-by: oguzismailuysal@gmail.com
8Bug-Reference-ID: <CAH7i3LoHFUa4aSF5-AD2r80HG-p-YzD_9ZxomarZkhP8NMq63g@mail.gmail.com>
9Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2020-12/msg00037.html
10
11Bug-Description:
12
13If there are no jobs, and the `-n' and `-p' options are both supplied to
14`wait', bash can assign a value to the variable name specified with `-p'
15instead of leaving it unset.
16
17Patch (apply with `patch -p0'):
18
19--- a/builtins/wait.def
20+++ b/builtins/wait.def
21@@ -213,11 +213,11 @@ wait_builtin (list)
22 }
23
24 status = wait_for_any_job (wflags, &pstat);
25- if (status < 0)
26- status = 127;
27-
28 if (vname && status >= 0)
29 bind_var_to_int (vname, pstat.pid);
30+
31+ if (status < 0)
32+ status = 127;
33 if (list)
34 unset_waitlist ();
35 WAIT_RETURN (status);
36--- a/patchlevel.h
37+++ b/patchlevel.h
38@@ -25,6 +25,6 @@
39 regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh
40 looks for to find the patch level (for the sccs version string). */
41
42-#define PATCHLEVEL 1
43+#define PATCHLEVEL 2
44
45 #endif /* _PATCHLEVEL_H_ */