Add support for RLIMIT_NPTS to limits(1).

After the MPSAFE TTY import we support an additional rlimit, called
RLIMIT_NPTS. This limit allows you to cap the amount of pseudo-terminals
allocated by one user.

We forgot to add support for this limit to limits(1), which means it
crashed. Add the proper bits to make it work like it should.
Unfortunately not all shells actually implement the RLIMIT, so
unfortunately I suspect it to be broken with certain shells.

Submitted by:	Yuriy Tsibizov <yuriy tsibizov gfk ru>
This commit is contained in:
Ed Schouten
2008-09-02 19:13:24 +00:00
parent f98c3ea74e
commit a583eb0809
2 changed files with 68 additions and 54 deletions
+6 -2
View File
@@ -30,11 +30,11 @@
.Op Fl C Ar class | Fl U Ar user
.Op Fl SHB
.Op Fl ea
.Op Fl bcdflmnstuv Op Ar val
.Op Fl bcdflmnstuvp Op Ar val
.Nm
.Op Fl C Ar class | Fl U Ar user
.Op Fl SHB
.Op Fl bcdflmnstuv Op Ar val
.Op Fl bcdflmnstuvp Op Ar val
.Op Fl E
.Oo
.Op Ar name Ns = Ns Ar value ...
@@ -262,6 +262,10 @@ and is inclusive of text, data, bss, stack,
and
.Xr mmap 2 Ns 'd
space.
.It Fl p Op Ar val
Select or set the
.Va pseudoterminals
resource limit.
.El
.Pp
Valid values for