]> git.ipfire.org Git - thirdparty/bash.git/commitdiff
Bash-5.1 patch 10: fix for wait -n being interrupted by a trapped signal
authorChet Ramey <chet.ramey@case.edu>
Wed, 17 Nov 2021 21:45:23 +0000 (16:45 -0500)
committerChet Ramey <chet.ramey@case.edu>
Wed, 17 Nov 2021 21:45:23 +0000 (16:45 -0500)
builtins/wait.def
patchlevel.h

index 824c83fe1d330bccc75f06274c6dd002320f7cd9..e70a4d9426c705da9b805700d9db20410fbd9508 100644 (file)
@@ -111,7 +111,8 @@ int
 wait_builtin (list)
      WORD_LIST *list;
 {
-  int status, code, opt, nflag, wflags;
+  int status, code, opt, nflag;
+  volatile int wflags;
   char *vname;
   SHELL_VAR *pidvar;
   struct procstat pstat;
@@ -180,6 +181,8 @@ wait_builtin (list)
       last_command_exit_signal = wait_signal_received;
       status = 128 + wait_signal_received;
       wait_sigint_cleanup ();
+      if (wflags & JWAIT_WAITING)
+       unset_waitlist ();
       WAIT_RETURN (status);
     }
 
index 17586ff7f5cf0994d637531533e12f2453e02f5e..75246e445c37d51ee7f28f23f53c53134821b3c7 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 9
+#define PATCHLEVEL 10
 
 #endif /* _PATCHLEVEL_H_ */