7 Bug-Reported-by: sunnycemetery@gmail.com
8 Bug-Reference-ID: <20190316041534.GB22884@midnight>
9 Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2019-03/msg00070.html
13 Bash waits too long to reap /dev/fd process substitutions used as redirections
14 with loops and group commands, which can lead to file descriptor exhaustion.
16 Patch (apply with `patch -p0'):
18 *** ../bash-5.0-patched/execute_cmd.c 2019-04-19 15:46:36.000000000 -0400
19 --- execute_cmd.c 2019-07-01 16:45:49.000000000 -0400
23 discard_unwind_frame ("internal_fifos");
25 + # if defined (HAVE_DEV_FD)
26 + /* Reap process substitutions at the end of loops */
27 + switch (command->type)
33 + # if defined (ARITH_FOR_COMMAND)
40 + # endif /* HAVE_DEV_FD */
44 *** ../bash-5.0/patchlevel.h 2016-06-22 14:51:03.000000000 -0400
45 --- patchlevel.h 2016-10-01 11:01:28.000000000 -0400
48 looks for to find the patch level (for the sccs version string). */
50 ! #define PATCHLEVEL 15
52 #endif /* _PATCHLEVEL_H_ */
54 looks for to find the patch level (for the sccs version string). */
56 ! #define PATCHLEVEL 16
58 #endif /* _PATCHLEVEL_H_ */