delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2007/05/22/11:01:23

X-Spam-Check-By: sourceware.org
Subject: Ulimit under cygwin
From: sabbella <sabbella AT tenison DOT com>
To: cygwin AT cygwin DOT com
Message-Id: <1179846027.3834.8.camel@localhost.localdomain>
Mime-Version: 1.0
X-Mailer: Ximian Evolution 1.4.5 (1.4.5-17)
Date: Tue, 22 May 2007 16:00:27 +0100
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019