Ulimit under cygwin

sabbella sabbella@tenison.com
Tue May 22 16:47:00 GMT 2007

 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
  # Set Hard ulimit 10 seconds longer than soft ulimit, so that
 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.$$ "$@" )
   return $timeit_rv

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/

More information about the Cygwin mailing list