Skip to content

Commit 80df12c

Browse files
committed
resources module, adding RLIMIT_KQUEUES constant from FreeBSD
1 parent 6a809fa commit 80df12c

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-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 created by this user id.
261+
262+
.. availability:: FreeBSD 11 or later.
263+
264+
.. versionadded:: 3.10
265+
258266
Resource Usage
259267
--------------
260268

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)