Chet Ramey | ac50fba | 2014-02-26 09:36:43 -0500 | [diff] [blame] | 1 | #!/bin/bash |
2 | # | ||||
3 | # Out of file descriptors, because it forgets to close redirection. Only | ||||
4 | # happens in a shell function. Problem through bash-4.2. | ||||
5 | |||||
6 | ulimit -n 128 | ||||
7 | |||||
8 | bug() | ||||
9 | { | ||||
10 | c=`ulimit -n` | ||||
11 | let c+=100 | ||||
12 | while let c-- | ||||
13 | do | ||||
14 | while read -ru3 x | ||||
15 | do | ||||
16 | echo -n : | ||||
17 | done 3< <(echo x) | ||||
18 | |||||
19 | done | ||||
20 | } | ||||
21 | |||||
22 | bug | ||||
23 | echo | ||||
24 | |||||
25 | exit 0 |