2012-02-03 10:46:17 +01:00
|
|
|
#!/bin/ksh
|
|
|
|
|
|
|
|
a_sh=$(mktemp ${TMPDIR:-/tmp}/${0##*/}.XXXXXX) || exit 1
|
|
|
|
trap "rm -f $a_sh" EXIT
|
|
|
|
|
2012-02-03 11:32:06 +01:00
|
|
|
(cat > $a_sh) <<-EOF
|
|
|
|
#!$SHELL
|
2012-02-06 13:36:57 +01:00
|
|
|
check_proc_handle ()
|
2012-02-03 10:46:17 +01:00
|
|
|
{
|
|
|
|
handleSoftLimit=$(ulimit -n)
|
|
|
|
echo \$handleSoftLimit > /dev/null
|
|
|
|
}
|
|
|
|
check_proc_handle
|
|
|
|
EOF
|
|
|
|
chmod +x $a_sh
|
|
|
|
|
|
|
|
typeset -lui count=${1:-4000}
|
|
|
|
|
|
|
|
while ((count-- > 0))
|
|
|
|
do
|
|
|
|
$a_sh
|
|
|
|
done
|