Skip to content

Commit 7be00ee

Browse files
authored
bpo-42960: Add resource.RLIMIT_KQUEUES constant from FreeBSD (GH-24251)
1 parent a3c3ffa commit 7be00ee

File tree

3 files changed

+13
-0
lines changed

3 files changed

+13
-0
lines changed

Doc/library/resource.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,14 @@ platform.
255255

256256
.. versionadded:: 3.4
257257

258+
.. data:: RLIMIT_KQUEUES
259+
260+
The maximum number of kqueues this user id is allowed to create.
261+
262+
.. availability:: FreeBSD 11 or later.
263+
264+
.. versionadded:: 3.10
265+
258266
Resource Usage
259267
--------------
260268

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Adds :data:`resource.RLIMIT_KQUEUES` constant from FreeBSD to the :mod:`resource` module.

Modules/resource.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -480,6 +480,10 @@ resource_exec(PyObject *module)
480480
ADD_INT(module, RLIMIT_NPTS);
481481
#endif
482482

483+
#ifdef RLIMIT_KQUEUES
484+
ADD_INT(module, RLIMIT_KQUEUES);
485+
#endif
486+
483487
PyObject *v;
484488
if (sizeof(RLIM_INFINITY) > sizeof(long)) {
485489
v = PyLong_FromLongLong((long long) RLIM_INFINITY);

0 commit comments

Comments
 (0)