aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKonstantin Belousov <kib@FreeBSD.org>2024-09-10 04:13:01 +0000
committerKonstantin Belousov <kib@FreeBSD.org>2024-09-20 06:46:06 +0000
commita4c04958f526a0dba353b54641dc5d2806984d02 (patch)
treefdeb2817aeaa8974399c9e70d02cf6ecaa8303d2
parent54a8d1fbbf65e976132809718525ba051a5525cf (diff)
libutil: support RLIMIT_PIPEBUF
Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D46619
-rw-r--r--lib/libutil/login.conf.51
-rw-r--r--lib/libutil/login_class.31
-rw-r--r--lib/libutil/login_class.c1
3 files changed, 3 insertions, 0 deletions
diff --git a/lib/libutil/login.conf.5 b/lib/libutil/login.conf.5
index a749fe5519ab..b1e7211e4c18 100644
--- a/lib/libutil/login.conf.5
+++ b/lib/libutil/login.conf.5
@@ -204,6 +204,7 @@ login environment.
.It "pseudoterminals number Maximum number of pseudo-terminals."
.It "swapuse size Maximum swap space size limit."
.It "umtxp number Maximum number of process-shared pthread locks."
+.It "pipebuf" size Maximum size of pipe buffers."
.El
.Pp
These resource limit entries actually specify both the maximum
diff --git a/lib/libutil/login_class.3 b/lib/libutil/login_class.3
index b67301f5a5a6..46e6a70f8ca8 100644
--- a/lib/libutil/login_class.3
+++ b/lib/libutil/login_class.3
@@ -118,6 +118,7 @@ pseudoterminals RLIMIT_NPTS
swapuse RLIMIT_SWAP
kqueues RLIMIT_KQUEUES
umtxp RLIMIT_UMTXP
+pipebuf RLIMIT_PIPEBUF
.Ed
.It LOGIN_SETPRIORITY
Set the scheduling priority for the current process based on the
diff --git a/lib/libutil/login_class.c b/lib/libutil/login_class.c
index 916e69065320..c3c1b0ddda27 100644
--- a/lib/libutil/login_class.c
+++ b/lib/libutil/login_class.c
@@ -65,6 +65,7 @@ static struct login_res {
{ "swapuse", login_getcapsize, RLIMIT_SWAP },
{ "kqueues", login_getcapsize, RLIMIT_KQUEUES },
{ "umtxp", login_getcapnum, RLIMIT_UMTXP },
+ { "pipebuf", login_getcapnum, RLIMIT_PIPEBUF },
{ NULL, 0, 0 }
};