1
0
Fork 0
mirror of synced 2025-03-06 20:53:29 +01:00

Bash-5.0 patch 16: bash waits too long to reap /dev/fd process substitutions with loops and group commands

This commit is contained in:
Chet Ramey 2020-02-07 15:20:38 -05:00
parent ad1b3e6822
commit 6c6454cb18
2 changed files with 17 additions and 1 deletions

View file

@ -1103,6 +1103,22 @@ execute_command_internal (command, asynchronous, pipe_in, pipe_out,
free ((void *)ofifo_list);
discard_unwind_frame ("internal_fifos");
}
# if defined (HAVE_DEV_FD)
/* Reap process substitutions at the end of loops */
switch (command->type)
{
case cm_while:
case cm_until:
case cm_for:
case cm_group:
# if defined (ARITH_FOR_COMMAND)
case cm_arith_for:
# endif
reap_procsubs ();
default:
break;
}
# endif /* HAVE_DEV_FD */
#endif
/* Invert the return value if we have to */

View 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 15
#define PATCHLEVEL 16
#endif /* _PATCHLEVEL_H_ */