blob: 27c48e829a83e6f40ac1ed6a55d439e66b76b3ae [file] [log] [blame]
Chet Rameyac50fba2014-02-26 09:36:43 -05001#!/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
6ulimit -n 128
7
8bug()
9{
10c=`ulimit -n`
11let c+=100
12while let c--
13do
14 while read -ru3 x
15 do
16 echo -n :
17 done 3< <(echo x)
18
19done
20}
21
22bug
23echo
24
25exit 0