-
-
Notifications
You must be signed in to change notification settings - Fork 32.6k
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 our terms of service and privacy 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
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 that RLIM_INFINITY
is bigger than limited values. AFAIK, POSIX would have no problem with RLIM_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.
This seems to have broken
|
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.