]>
Commit | Line | Data |
---|---|---|
987826de PM |
1 | BASH PATCH REPORT |
2 | ================= | |
3 | ||
4 | Bash-Release: 5.0 | |
5 | Patch-ID: bash50-016 | |
6 | ||
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 | |
10 | ||
11 | Bug-Description: | |
12 | ||
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. | |
15 | ||
16 | Patch (apply with `patch -p0'): | |
17 | ||
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 | |
20 | *************** | |
21 | *** 1104,1107 **** | |
22 | --- 1085,1104 ---- | |
23 | discard_unwind_frame ("internal_fifos"); | |
24 | } | |
25 | + # if defined (HAVE_DEV_FD) | |
26 | + /* Reap process substitutions at the end of loops */ | |
27 | + switch (command->type) | |
28 | + { | |
29 | + case cm_while: | |
30 | + case cm_until: | |
31 | + case cm_for: | |
32 | + case cm_group: | |
33 | + # if defined (ARITH_FOR_COMMAND) | |
34 | + case cm_arith_for: | |
35 | + # endif | |
36 | + reap_procsubs (); | |
37 | + default: | |
38 | + break; | |
39 | + } | |
40 | + # endif /* HAVE_DEV_FD */ | |
41 | #endif | |
42 | ||
43 | ||
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 | |
46 | *************** | |
47 | *** 26,30 **** | |
48 | looks for to find the patch level (for the sccs version string). */ | |
49 | ||
50 | ! #define PATCHLEVEL 15 | |
51 | ||
52 | #endif /* _PATCHLEVEL_H_ */ | |
53 | --- 26,30 ---- | |
54 | looks for to find the patch level (for the sccs version string). */ | |
55 | ||
56 | ! #define PATCHLEVEL 16 | |
57 | ||
58 | #endif /* _PATCHLEVEL_H_ */ |