diff options
Diffstat (limited to 'tests/redir10.sub')
-rw-r--r-- | tests/redir10.sub | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/redir10.sub b/tests/redir10.sub new file mode 100644 index 0000000..27c48e8 --- /dev/null +++ b/tests/redir10.sub @@ -0,0 +1,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 |