]> git.ipfire.org Git - thirdparty/bash.git/commitdiff
Bash-5.3 patch 1: fix posix-mode issue with "wait -n", where it can return process...
authorChet Ramey <chet.ramey@case.edu>
Wed, 23 Jul 2025 19:42:17 +0000 (15:42 -0400)
committerChet Ramey <chet.ramey@case.edu>
Wed, 23 Jul 2025 19:42:17 +0000 (15:42 -0400)
jobs.c
patchlevel.h

diff --git a/jobs.c b/jobs.c
index 528c90f5b7ec9c5ea4b1a71ed070d29d5292053b..cbcc2c15f4453f525aefce5488e105937aef0e13 100644 (file)
--- a/jobs.c
+++ b/jobs.c
@@ -3538,7 +3538,7 @@ return_procsub:
   /* There aren't any dead jobs in the jobs table, but let's see if there's
      one in bgpids. We can do this in posix mode because we'll remove any
      one we find from the table, preserving existing semantics. */
-  if (posixly_correct && (t = bgp_findone ()))
+  if (posixly_correct && (flags & JWAIT_WAITING) == 0 && (t = bgp_findone ()))
     {
       pid = t->pid;
       r = t->status;
index 4075274208aa2f9fc77fa2779e69f4978d5a26bc..e473bd5a6d4d6872e6d78e88ff0eae55e11db059 100644 (file)
@@ -25,6 +25,6 @@
    regexp `^#define[   ]*PATCHLEVEL', since that's what support/mkversion.sh
    looks for to find the patch level (for the sccs version string). */
 
-#define PATCHLEVEL 0
+#define PATCHLEVEL 1
 
 #endif /* _PATCHLEVEL_H_ */