please see patch(and info) in https://gist.github.com/howaboutsynergy/3e7237a53dbd102f821650b97b9bde57#gistcomment-2961148 (patch also attached)
Configuration Information [Automatically generated, do not change]: Machine: x86_64 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -pipe -march=native -Wno-trigraphs -fno-schedule-insns2 -fno-delete-null-pointer-checks -mtune=native -fomit-frame-pointer -O2 -D_FORTIFY_SOURCE=2 -DDEFAULT_PATH_VALUE='/usr/local/sbin:/usr/local/bin:/usr/bin' -DSTANDARD_UTILS_PATH='/usr/bin' -DSYS_BASHRC='/etc/bash.bashrc' -DSYS_BASH_LOGOUT='/etc/bash.bash_logout' -DNON_INTERACTIVE_LOGIN_SHELLS -fstack-protector-strong -fno-omit-frame-pointer -ftrack-macro-expansion=2 -ggdb -fvar-tracking-assignments -O0 -Wno-parentheses -Wno-format-security uname output: Linux i87k 5.2.0-rc7-g6fbc7275c7a9 #15 SMP Wed Jul 3 00:43:14 CEST 2019 x86_64 GNU/Linux Machine Type: x86_64-pc-linux-gnu Bash Version: 5.0 Patch Level: 7 Release Status: maint all other details got lost when I answered 'n' to: Send bug report to [email protected]? [y/n] (and I don't feel like typing all that again) but all you need to know is already in that gist comment anyway thanks.
diff --git a/jobs.c b/jobs.c
index d81bc238..7756406f 100644
--- a/jobs.c
+++ b/jobs.c
@@ -2499,10 +2499,22 @@ wait_for_background_pids (ps)
}
#if defined (PROCESS_SUBSTITUTION)
- if (last_procsub_child && last_procsub_child->pid != NO_PID && last_procsub_child->pid == last_asynchronous_pid)
+ if (last_procsub_child && last_procsub_child->pid != NO_PID)
r = wait_for (last_procsub_child->pid);
wait_procsubs ();
reap_procsubs ();
+#if 0
+ /* We don't want to wait indefinitely if we have stopped children. */
+ if (any_stopped == 0)
+ {
+ /* Check whether or not we have any unreaped children. */
+ while ((r = wait_for (ANY_PID)) >= 0)
+ {
+ QUIT;
+ CHECK_WAIT_INTR;
+ }
+ }
+#endif
#endif
/* POSIX.2 says the shell can discard the statuses of all completed jobs if
@@ -3695,10 +3707,8 @@ itrace("waitchld: waitpid returns %d block = %d children_exited = %d", pid, bloc
/* Only manipulate the list of process substitutions while SIGCHLD
is blocked. */
if ((ind = find_procsub_child (pid)) >= 0)
- {
- set_procsub_status (ind, pid, WSTATUS (status));
- bgp_add (pid, WSTATUS (status));
- }
+ set_procsub_status (ind, pid, WSTATUS (status));
+ /* XXX - save in bgpids list? */
#endif
/* It is not an error to have a child terminate that we did
publickey - [email protected] - 0x947B9B34.asc
Description: application/pgp-keys
signature.asc
Description: OpenPGP digital signature
