Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.3k
gh-137044: Make resource.RLIM_INFINITY always positive#137511
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
gh-137044: Make resource.RLIM_INFINITY always positive#137511
Uh oh!
There was an error while loading.Please reload this page.
Conversation
It is now a positive integer larger larger than any limited resource value.This simplifies comparison of the resource values.Previously, it could be negative, such as -1 or -3, depending on platform.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
OK, let's do this. It's the practical thing to do; if there are platforms that conform to POSIX in more interesting ways then we'll hopefullly notice in the 3.15 cycle.
| :data:`resource.RLIM_INFINITY` is now always a positive integer larger than | ||
| any limited resource value. This simplifies comparison of the resource | ||
| values. Previously, it could be negative, such as -1 or -3, depending on | ||
| platform. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I don't think we test/guarantee thatRLIM_INFINITY is bigger than limited values. AFAIK, POSIX would have no problem withRLIM_INFINITY being zero.
So, this should be:
| :data:`resource.RLIM_INFINITY` is now always a positive integer larger than | |
| any limited resource value. This simplifies comparison of the resource | |
| values. Previously, it could be negative, such as -1 or -3, depending on | |
| platform. | |
| :data:`resource.RLIM_INFINITY` is now always a positive integer. | |
| Previously, it could be negative, such as -1 or -3, depending on | |
| platform. |
or:
| :data:`resource.RLIM_INFINITY` is now always a positive integer larger than | |
| any limited resource value. This simplifies comparison of the resource | |
| values. Previously, it could be negative, such as -1 or -3, depending on | |
| platform. | |
| :data:`resource.RLIM_INFINITY` is now always a positive integer. | |
| On supported platforms, it is larger than any limited resource value, | |
| which simplifies comparison of the resource values. | |
| Previously, it could be negative, such as -1 or -3, depending on | |
| platform. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
https://pubs.opengroup.org/onlinepubs/9799919799/functions/getrlimit.html
The value RLIM_INFINITY, defined in<sys/resource.h>, shall be considered to be larger than any other limit value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
To be clear, I do not think this should have been merged without this change.
0324c72 intopython:mainUh oh!
There was an error while loading.Please reload this page.
This seems to have broken |
Test fix:#137941. |
…H-137511)It is now a positive integer larger larger than any limited resource value.This simplifies comparison of the resource values.Previously, it could be negative, such as -1 or -3, depending on platform.Deprecation warning is emitted if the old negative value is passed.
Uh oh!
There was an error while loading.Please reload this page.
It is now a positive integer larger than any limited resource value. This simplifies comparison of the resource values. Previously, it could be negative, such as -1 or -3, depending on platform.