mirror of https://github.com/python/cpython
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
|
||||
|
||||
.. 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
|
||||
--------------
|
||||
|
||||
|
|
|
@ -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);
|
||||
#endif
|
||||
|
||||
#ifdef RLIMIT_KQUEUES
|
||||
ADD_INT(module, RLIMIT_KQUEUES);
|
||||
#endif
|
||||
|
||||
PyObject *v;
|
||||
if (sizeof(RLIM_INFINITY) > sizeof(long)) {
|
||||
v = PyLong_FromLongLong((long long) RLIM_INFINITY);
|
||||
|
|
Loading…
Reference in New Issue