mirror of
https://github.com/python/cpython
synced 2024-09-05 00:05:39 +00:00
bpo-42960: Add resource.RLIMIT_KQUEUES constant from FreeBSD (GH-24251)
This commit is contained in:
parent
a3c3ffa68e
commit
7be00ee64a
|
@ -255,6 +255,14 @@ platform.
|
||||||
|
|
||||||
.. versionadded:: 3.4
|
.. versionadded:: 3.4
|
||||||
|
|
||||||
|
.. data:: RLIMIT_KQUEUES
|
||||||
|
|
||||||
|
The maximum number of kqueues this user id is allowed to create.
|
||||||
|
|
||||||
|
.. availability:: FreeBSD 11 or later.
|
||||||
|
|
||||||
|
.. versionadded:: 3.10
|
||||||
|
|
||||||
Resource Usage
|
Resource Usage
|
||||||
--------------
|
--------------
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
Adds :data:`resource.RLIMIT_KQUEUES` constant from FreeBSD to the :mod:`resource` module.
|
|
@ -480,6 +480,10 @@ resource_exec(PyObject *module)
|
||||||
ADD_INT(module, RLIMIT_NPTS);
|
ADD_INT(module, RLIMIT_NPTS);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef RLIMIT_KQUEUES
|
||||||
|
ADD_INT(module, RLIMIT_KQUEUES);
|
||||||
|
#endif
|
||||||
|
|
||||||
PyObject *v;
|
PyObject *v;
|
||||||
if (sizeof(RLIM_INFINITY) > sizeof(long)) {
|
if (sizeof(RLIM_INFINITY) > sizeof(long)) {
|
||||||
v = PyLong_FromLongLong((long long) RLIM_INFINITY);
|
v = PyLong_FromLongLong((long long) RLIM_INFINITY);
|
||||||
|
|
Loading…
Reference in a new issue