Message184086
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. |
|
Date |
User |
Action |
Args |
2013-03-13 15:18:36 | Paul.Price | set | recipients:
+ Paul.Price |
2013-03-13 15:18:35 | Paul.Price | set | messageid: <1363187915.96.0.919342054358.issue17409@psf.upfronthosting.co.za> |
2013-03-13 15:18:35 | Paul.Price | link | issue17409 messages |
2013-03-13 15:18:35 | Paul.Price | create | |
|