summaryrefslogtreecommitdiffstats
path: root/tests/redir10.sub
blob: 27c48e829a83e6f40ac1ed6a55d439e66b76b3ae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/bash
#
# Out of file descriptors, because it forgets to close redirection.  Only
# happens in a shell function.  Problem through bash-4.2.

ulimit -n 128

bug()
{
c=`ulimit -n`
let c+=100
while let c--
do
	while read -ru3 x
	do
		echo -n :
	done 3< <(echo x)

done
}

bug
echo

exit 0