[issue40518] ValueError when using resource.setrlimit on macOS Catalina

Shota Iwamoto report at bugs.python.org
Tue May 5 09:57:38 EDT 2020


New submission from Shota Iwamoto <morio.prog at gmail.com>:

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.

----------
components: macOS
messages: 368149
nosy: morioprog, ned.deily, ronaldoussoren
priority: normal
severity: normal
status: open
title: ValueError when using resource.setrlimit on macOS Catalina
type: behavior
versions: Python 3.7

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40518>
_______________________________________


More information about the Python-bugs-list mailing list