Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F112041776
D5610.id14249.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
4 KB
Referenced Files
None
Subscribers
None
D5610.id14249.diff
View Options
Index: bin/sh/miscbltin.c
===================================================================
--- bin/sh/miscbltin.c
+++ bin/sh/miscbltin.c
@@ -452,7 +452,7 @@
struct rlimit limit;
what = 'f';
- while ((optc = nextopt("HSatfdsmcnuvlbpwk")) != '\0')
+ while ((optc = nextopt("HSatfdsmcnuvlbpwko")) != '\0')
switch (optc) {
case 'H':
how = HARD;
Index: bin/sh/sh.1
===================================================================
--- bin/sh/sh.1
+++ bin/sh/sh.1
@@ -2615,7 +2615,7 @@
For aliases the alias expansion is printed;
for commands and tracked aliases
the complete pathname of the command is printed.
-.It Ic ulimit Oo Fl HSabcdfklmnpstuvw Oc Op Ar limit
+.It Ic ulimit Oo Fl HSabcdfklmnopstuvw Oc Op Ar limit
Set or display resource limits (see
.Xr getrlimit 2 ) .
If
@@ -2674,6 +2674,11 @@
The maximal resident set size of a process, in kilobytes.
.It Fl n Ar nofiles
The maximal number of descriptors that could be opened by a process.
+.It Fl o Ar umtxp
+The maximal number of process-shared locks
+(see
+.Xr pthread 3 )
+for this user ID.
.It Fl p Ar pseudoterminals
The maximal number of pseudo-terminals for this user ID.
.It Fl s Ar stacksize
Index: etc/login.conf
===================================================================
--- etc/login.conf
+++ etc/login.conf
@@ -43,6 +43,7 @@
:swapuse=unlimited:\
:pseudoterminals=unlimited:\
:kqueues=unlimited:\
+ :umtxp=unlimited:\
:priority=0:\
:ignoretime@:\
:umask=022:
Index: lib/libutil/login.conf.5
===================================================================
--- lib/libutil/login.conf.5
+++ lib/libutil/login.conf.5
@@ -199,6 +199,7 @@
.It "stacksize size Maximum stack size limit."
.It "pseudoterminals number Maximum number of pseudo-terminals."
.It "swapuse size Maximum swap space size limit."
+.It "umxp number Maximum number of process-shared pthread locks."
.El
.Pp
These resource limit entries actually specify both the maximum
Index: lib/libutil/login_class.3
===================================================================
--- lib/libutil/login_class.3
+++ lib/libutil/login_class.3
@@ -119,6 +119,7 @@
pseudoterminals RLIMIT_NPTS
swapuse RLIMIT_SWAP
kqueues RLIMIT_KQUEUES
+umxp RLIMIT_UMTXP
.Ed
.It LOGIN_SETPRIORITY
Set the scheduling priority for the current process based on the
Index: lib/libutil/login_class.c
===================================================================
--- lib/libutil/login_class.c
+++ lib/libutil/login_class.c
@@ -67,6 +67,7 @@
{ "pseudoterminals", login_getcapnum, RLIMIT_NPTS },
{ "swapuse", login_getcapsize, RLIMIT_SWAP },
{ "kqueues", login_getcapsize, RLIMIT_KQUEUES },
+ { "umxp", login_getcapnum, RLIMIT_UMTXP },
{ NULL, 0, 0 }
};
Index: usr.bin/limits/limits.1
===================================================================
--- usr.bin/limits/limits.1
+++ usr.bin/limits/limits.1
@@ -30,11 +30,11 @@
.Op Fl C Ar class | Fl P Ar pid | Fl U Ar user
.Op Fl SHB
.Op Fl ea
-.Op Fl bcdfklmnstuvpw Op Ar val
+.Op Fl bcdfklmnopstuvw Op Ar val
.Nm
.Op Fl C Ar class | Fl U Ar user
.Op Fl SHB
-.Op Fl bcdfklmnstuvpw Op Ar val
+.Op Fl bcdfklmnopstuvw Op Ar val
.Op Fl E
.Oo
.Op Ar name Ns = Ns Ar value ...
@@ -233,6 +233,16 @@
.Va kern.maxfiles
.Xr sysctl 8
variable.
+.It Fl o Op Ar val
+Select or set the
+.Va process-shared locks
+(see
+.Xr pthread 3 )
+resource limit.
+.It Fl p Op Ar val
+Select or set the
+.Va pseudoterminals
+resource limit.
.It Fl s Op Ar val
Select or set the
.Va stacksize
@@ -266,10 +276,6 @@
and
.Xr mmap 2 Ns 'd
space.
-.It Fl p Op Ar val
-Select or set the
-.Va pseudoterminals
-resource limit.
.It Fl w Op Ar val
Select or set the
.Va swapuse
Index: usr.bin/limits/limits.c
===================================================================
--- usr.bin/limits/limits.c
+++ usr.bin/limits/limits.c
@@ -254,7 +254,7 @@
* to be modified accordingly!
*/
-#define RCS_STRING "tfdscmlunbvpwk"
+#define RCS_STRING "tfdscmlunbvpwko"
static rlim_t resource_num(int which, int ch, const char *str);
static void usage(void);
@@ -551,7 +551,7 @@
{
(void)fprintf(stderr,
"usage: limits [-C class|-P pid|-U user] [-eaSHBE] "
- "[-bcdflmnstuvpwk [val]] [[name=val ...] cmd]\n");
+ "[-bcdfklmnostuvpw [val]] [[name=val ...] cmd]\n");
exit(EXIT_FAILURE);
}
@@ -660,6 +660,7 @@
case RLIMIT_NOFILE:
case RLIMIT_NPTS:
case RLIMIT_KQUEUES:
+ case RLIMIT_UMTXP:
res = strtoq(s, &e, 0);
s = e;
break;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Mar 12, 11:46 PM (9 h, 33 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
17127590
Default Alt Text
D5610.id14249.diff (4 KB)
Attached To
Mode
D5610: Fix handling of umtxp resource limit in sh(1), limits(1), and login.conf(5).
Attached
Detach File
Event Timeline
Log In to Comment