summaryrefslogtreecommitdiffstats
path: root/lib/libutil
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2016-03-12 14:54:34 +0000
committerkib <kib@FreeBSD.org>2016-03-12 14:54:34 +0000
commitc25914807466d1029480aca4fac687af6e2e1918 (patch)
tree69599a8cabd37a03a7aef687faef00d3bf85ab4c /lib/libutil
parent3c057e4b1fa0583a4ca025153e05a66869a4396e (diff)
downloadFreeBSD-src-c25914807466d1029480aca4fac687af6e2e1918.zip
FreeBSD-src-c25914807466d1029480aca4fac687af6e2e1918.tar.gz
Fix handling of umtxp resource limit in sh(1)/ulimit(1), limits(1), add
login.conf(5) support. Reviewed by: jilles Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D5610
Diffstat (limited to 'lib/libutil')
-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 e780940..1c3cfee 100644
--- a/lib/libutil/login.conf.5
+++ b/lib/libutil/login.conf.5
@@ -199,6 +199,7 @@ notation may be used.
.It "stacksize size Maximum stack size limit."
.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."
.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 c87faae..ab2e8af 100644
--- a/lib/libutil/login_class.3
+++ b/lib/libutil/login_class.3
@@ -119,6 +119,7 @@ vmemoryuse RLIMIT_VMEM
pseudoterminals RLIMIT_NPTS
swapuse RLIMIT_SWAP
kqueues RLIMIT_KQUEUES
+umtxp RLIMIT_UMTXP
.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 9ffca8e..ceee5c8 100644
--- a/lib/libutil/login_class.c
+++ b/lib/libutil/login_class.c
@@ -67,6 +67,7 @@ static struct login_res {
{ "pseudoterminals", login_getcapnum, RLIMIT_NPTS },
{ "swapuse", login_getcapsize, RLIMIT_SWAP },
{ "kqueues", login_getcapsize, RLIMIT_KQUEUES },
+ { "umtxp", login_getcapnum, RLIMIT_UMTXP },
{ NULL, 0, 0 }
};
OpenPOWER on IntegriCloud