Hello Everyone-

I've been working at a BASH script which will open file descriptor 3  
and writing hello to it, executing itself reading FD-3, done in a  
while loop.

I am attempting to exceed the hard file descriptor limit (default of  
4096) to see what happens once it is reached.

What I've learned is that for each forked process from the script it  
has its own soft and hard limit, and need some clarification.

My question now is: instead of calling the script in a loop, do I  
simply keep opening FD's 3,4,5,6.... until exceeding the limit?

With this script I got up to 1000+ loops with over 5000+ open files  
before I started getting: resource temporarily unavailable messages.

Does this sound right? Can someone help clarify this crazy little question?

#!/bin/bash

{ exec 0>&3; } 1>/dev/null 2>&1 && exec 3>/dev/null || exec 3>/dev/tty

COUNT=0

while [ $COUNT -lt 5000 ]; do
    exec 3<<<hello
    cat <&3
    ps -u <username> |grep fdl.sh |wc -l
    sudo /usr/sbin/lsof -u <username> |wc -l
    ./fdl.sh
    let COUNT+=1
done

--------
Thanks,
SDA