This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Ulimit under cygwin
- From: sabbella <sabbella at tenison dot com>
- To: cygwin at cygwin dot com
- Date: Tue, 22 May 2007 16:00:27 +0100
- Subject: Ulimit under cygwin
Hi,
I have problems with a function in my shell script. It contains
commands to set the soft and hard ulimits. This works fine on Linux. But
I have problems on cygwin. I tried to change the soft and hard ulimits
I get the following error message.
"ulimit : cpu time: file size:cannot modify limit : invalid argument".
If I can't modify the ulimit under cygwin, please can you suggest me
with an alternative.
Here is the function:
function time_or_fail ()
{
timeit_name="$1"; shift
date_and_load
# Set Hard ulimit 10 seconds longer than soft ulimit, so that
$timeprog
itself is likely to survive.
local -i this_soft_ulimit="${ULIMIT:=4000} * ${MACHINE_SLOWNESS:=2}"
local -i this_hard_ulimit="${this_soft_ulimit} + 10"
( ulimit -H -t ${this_hard_ulimit}; ulimit -S -t ${this_soft_ulimit};
$timeprog -f '%U %S %e %P' -o timeit.$$ "$@" )
timeit_rv=$?
return $timeit_rv
}
Regards,
Sabbella
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/