]> git.ipfire.org Git - thirdparty/bash.git/commitdiff
Bash-5.1 patch 2: fix wait -n -p var with no jobs not leaving var unset
authorChet Ramey <chet.ramey@case.edu>
Sat, 19 Dec 2020 19:27:54 +0000 (14:27 -0500)
committerChet Ramey <chet.ramey@case.edu>
Sat, 19 Dec 2020 19:27:54 +0000 (14:27 -0500)
builtins/wait.def
patchlevel.h

index 12260737a95174bce196192e0f210cdd8e40149e..824c83fe1d330bccc75f06274c6dd002320f7cd9 100644 (file)
@@ -213,11 +213,11 @@ wait_builtin (list)
        }
 
       status = wait_for_any_job (wflags, &pstat);
-      if (status < 0)
-       status = 127;
-
       if (vname && status >= 0)
        bind_var_to_int (vname, pstat.pid);
+
+      if (status < 0)
+       status = 127;
       if (list)
        unset_waitlist ();
       WAIT_RETURN (status);
index d5b8c5afe015897516e239afdc53cb385964561e..8a1835518c8aca5fd2ccfef13668776f4516e015 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 1
+#define PATCHLEVEL 2
 
 #endif /* _PATCHLEVEL_H_ */