Skip to content

Commit f9b2fb9

Browse files
Document RLIMIT_PIPEBUF. Other doc fixes.
1 parent de291ed commit f9b2fb9

File tree

3 files changed

+17
-8
lines changed

3 files changed

+17
-8
lines changed

Doc/library/resource.rst

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,7 @@ this module for those platforms.
6262

6363
Constants used to represent the soft and hard limit values if they
6464
cannot be represented in the ``rlim_t`` value in C.
65-
On FreeBSD they are aliases of :data:`RLIM_INFINITY`.
66-
67-
.. availability:: Solaris, AIX, FreeBSD
65+
Can be equal to :data:`RLIM_INFINITY`.
6866

6967
.. versionadded:: next
7068

@@ -193,8 +191,9 @@ platform.
193191
.. data:: RLIMIT_VMEM
194192

195193
The largest area of mapped memory which the process may occupy.
194+
Usually an alias of :const:`RLIMIT_AS`.
196195

197-
.. availability:: Solaris, FreeBSD.
196+
.. availability:: Solaris, FreeBSD, NetBSD.
198197

199198

200199
.. data:: RLIMIT_AS
@@ -254,7 +253,7 @@ platform.
254253
This limits the amount of network memory, and hence the amount of mbufs,
255254
that this user may hold at any time.
256255

257-
.. availability:: FreeBSD.
256+
.. availability:: FreeBSD, NetBSD.
258257

259258
.. versionadded:: 3.4
260259

@@ -301,6 +300,16 @@ platform.
301300
.. versionadded:: next
302301

303302

303+
.. data:: RLIMIT_PIPEBUF
304+
305+
The maximum total size of in-kernel buffers for bi-directional pipes/fifos
306+
that this user id is allowed to consume.
307+
308+
.. availability:: FreeBSD >= 14.2.
309+
310+
.. versionadded:: next
311+
312+
304313
.. data:: RLIMIT_THREADS
305314

306315
The maximum number of threads each process can create.

Lib/test/test_resource.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ def test_linux_constants(self):
216216
self.assertIsInstance(getattr(resource, 'RLIMIT_' + attr), int)
217217

218218
def test_freebsd_contants(self):
219-
for attr in ['SWAP', 'SBSIZE', 'NPTS', 'UMTXP', 'VMEM']:
219+
for attr in ['SWAP', 'SBSIZE', 'NPTS', 'UMTXP', 'VMEM', 'PIPEBUF']:
220220
with contextlib.suppress(AttributeError):
221221
self.assertIsInstance(getattr(resource, 'RLIMIT_' + attr), int)
222222

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
Add new constants in the :mod:`resource` module:
22
:data:`~resource.RLIMIT_NTHR`, :data:`~resource.RLIMIT_UMTXP`,
3-
:data:`~resource.RLIMIT_THREADS`, :data:`~resource.RLIM_SAVED_CUR`, and
4-
:data:`~resource.RLIM_SAVED_MAX`.
3+
:data:`~resource.RLIMIT_PIPEBUF`, :data:`~resource.RLIMIT_THREADS`,
4+
:data:`~resource.RLIM_SAVED_CUR`, and :data:`~resource.RLIM_SAVED_MAX`.

0 commit comments

Comments
 (0)