Bash-4.3 distribution sources and documentation
[platform/upstream/bash.git] / tests / redir10.sub
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