This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Paul.Price
Recipients Paul.Price
Date 2013-03-13.15:18:35
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1363187915.96.0.919342054358.issue17409@psf.upfronthosting.co.za>
In-reply-to
Content
The docs for resource.setrlimit (http://docs.python.org/2.7/library/resource.html#resource.setrlimit) state: "The limits argument must be a tuple (soft, hard) of two integers describing the new limits. A value of -1 can be used to specify the maximum possible upper limit."

On Mac OSX (10.7.5) with Python 2.7.3 (built fresh), I get the following behaviour:


$ PATH=$HOME/test/bin:$PATH DYLD_LIBRARY_PATH=$HOME/test/lib:$DYLD_LIBRARY_PATH python
Python 2.7.3 (default, Mar 13 2013, 11:02:56) 
[GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.9.00)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import resource
>>> resource.setrlimit(resource.RLIMIT_NOFILE, (10, -1))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: not allowed to raise maximum limit
>>> resource.setrlimit(resource.RLIMIT_NOFILE, (10, 10))
>>> 


I get the same behaviour for the system python (2.7.3 built with GCC 4.6.3) in Ubuntu 12.04.1.
History
Date User Action Args
2013-03-13 15:18:36Paul.Pricesetrecipients: + Paul.Price
2013-03-13 15:18:35Paul.Pricesetmessageid: <1363187915.96.0.919342054358.issue17409@psf.upfronthosting.co.za>
2013-03-13 15:18:35Paul.Pricelinkissue17409 messages
2013-03-13 15:18:35Paul.Pricecreate