diff options
author | Chet Ramey <chet.ramey@case.edu> | 2021-11-17 16:45:23 -0500 |
---|---|---|
committer | Chet Ramey <chet.ramey@case.edu> | 2021-11-17 16:45:23 -0500 |
commit | 910fcdc415abeb3d7d85fb46ee0d3e804a4c47a6 (patch) | |
tree | 67389d59f8cfb8cff655a69c709d73f5aa74c28d | |
parent | fed42742e0b33b358610bf62c7474f55e6465205 (diff) | |
download | bash-910fcdc415abeb3d7d85fb46ee0d3e804a4c47a6.tar.gz |
Bash-5.1 patch 10: fix for wait -n being interrupted by a trapped signal
-rw-r--r-- | builtins/wait.def | 5 | ||||
-rw-r--r-- | patchlevel.h | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/builtins/wait.def b/builtins/wait.def index 824c83fe..e70a4d94 100644 --- a/builtins/wait.def +++ b/builtins/wait.def @@ -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); } diff --git a/patchlevel.h b/patchlevel.h index 17586ff7..75246e44 100644 --- a/patchlevel.h +++ b/patchlevel.h @@ -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_ */ |