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.
Created on 2020年05月05日 13:57 by morioprog, last changed 2022年04月11日 14:59 by admin. This issue is now closed.
| Messages (2) | |||
|---|---|---|---|
| msg368149 - (view) | Author: Shota Iwamoto (morioprog) | Date: 2020年05月05日 13:57 | |
Hello, I'm having trouble when using `resource.setrlimit` on macOS. ``` import resource resource.setrlimit(resource.RLIMIT_STACK, resource.getrlimit(resource.RLIMIT_STACK)) ``` Running this code gives the following error: ``` Traceback (most recent call last): File "main.py", line 2, in <module> resource.setrlimit(resource.RLIMIT_STACK, resource.getrlimit(resource.RLIMIT_STACK)) ValueError: current limit exceeds maximum limit ``` I ran the same code in my linux environment and it worked. * macOS Catalina 10.15.4 (19E287) * `python --version` : Python 3.7.7 Thanks. |
|||
| msg368214 - (view) | Author: Ned Deily (ned.deily) * (Python committer) | Date: 2020年05月06日 00:00 | |
See the long discussion in Issue34602 for more details. The investigation there showed that there are now conditions when running in newer versions of macOS (apparently as of 10.14.4) where trying to increase the stack limit at run time using resource.RLIMIT_STACK fails. If you do need to increase the stack limit, to handle deeper recusions etc, one solution is to rebuild Python for macOS with a larger stack size as shown in PR 14546 rather than trying to change it at runtime. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:59:30 | admin | set | github: 84698 |
| 2020年05月06日 00:00:00 | ned.deily | set | status: open -> closed superseder: python3 resource.setrlimit strange behaviour under macOS messages: + msg368214 resolution: duplicate stage: resolved |
| 2020年05月05日 14:05:11 | corona10 | set | nosy:
+ corona10 |
| 2020年05月05日 13:57:38 | morioprog | create | |