From c25914807466d1029480aca4fac687af6e2e1918 Mon Sep 17 00:00:00 2001 From: kib Date: Sat, 12 Mar 2016 14:54:34 +0000 Subject: 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 --- lib/libutil/login.conf.5 | 1 + lib/libutil/login_class.3 | 1 + lib/libutil/login_class.c | 1 + 3 files changed, 3 insertions(+) (limited to 'lib/libutil') 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 } }; -- cgit v1.1