X-Spam-Check-By: sourceware.org Subject: Ulimit under cygwin From: sabbella To: cygwin AT cygwin DOT com Content-Type: text/plain 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 Content-Transfer-Encoding: 7bit Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , 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/