Module Name: src
Committed By: njoly
Date: Mon Jun 11 18:28:10 UTC 2012
Modified Files:
src/bin/sh: miscbltin.c sh.1
Log Message:
Allow thread limit queries by adding the new -r flag to ulimit. Add
the corresponding documentation in the man page.
To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/bin/sh/miscbltin.c
cvs rdiff -u -r1.106 -r1.107 src/bin/sh/sh.1
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/bin/sh/miscbltin.c
diff -u src/bin/sh/miscbltin.c:1.41 src/bin/sh/miscbltin.c:1.42
--- src/bin/sh/miscbltin.c:1.41 Sat Jun 9 02:49:48 2012
+++ src/bin/sh/miscbltin.c Mon Jun 11 18:28:10 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: miscbltin.c,v 1.41 2012/06/09 02:49:48 christos Exp $ */
+/* $NetBSD: miscbltin.c,v 1.42 2012/06/11 18:28:10 njoly Exp $ */
/*-
* Copyright (c) 1991, 1993
@@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)miscbltin.c 8.4 (Berkeley) 5/4/95";
#else
-__RCSID("$NetBSD: miscbltin.c,v 1.41 2012/06/09 02:49:48 christos Exp $");
+__RCSID("$NetBSD: miscbltin.c,v 1.42 2012/06/11 18:28:10 njoly Exp $");
#endif
#endif /* not lint */
@@ -364,7 +364,7 @@ ulimitcmd(int argc, char **argv)
struct rlimit limit;
what = 'f';
- while ((optc = nextopt("HSabtfdsmcnplv")) != '\0')
+ while ((optc = nextopt("HSabtfdscmlrpnv")) != '\0')
switch (optc) {
case 'H':
how = HARD;
Index: src/bin/sh/sh.1
diff -u src/bin/sh/sh.1:1.106 src/bin/sh/sh.1:1.107
--- src/bin/sh/sh.1:1.106 Wed Oct 5 13:15:30 2011
+++ src/bin/sh/sh.1 Mon Jun 11 18:28:10 2012
@@ -1,4 +1,4 @@
-.\" $NetBSD: sh.1,v 1.106 2011/10/05 13:15:30 christos Exp $
+.\" $NetBSD: sh.1,v 1.107 2012/06/11 18:28:10 njoly Exp $
.\" Copyright (c) 1991, 1993
.\" The Regents of the University of California. All rights reserved.
.\"
@@ -31,7 +31,7 @@
.\"
.\" @(#)sh.1 8.6 (Berkeley) 5/4/95
.\"
-.Dd October 4, 2011
+.Dd June 11, 2012
.Dt SH 1
.Os
.Sh NAME
@@ -1731,7 +1731,7 @@ command, tracked alias and not found.
For aliases the alias expansion is
printed; for commands and tracked aliases the complete pathname of the
command is printed.
-.It ulimit Oo Fl H \*(Ba Fl S Oc Oo Fl a \*(Ba Fl tfdscmlpnv Oo Ar value Oc Oc
+.It ulimit Oo Fl H \*(Ba Fl S Oc Oo Fl a \*(Ba Fl btfdscmlrpnv Oo Ar value Oc Oc
Inquire about or set the hard or soft limits on processes or set new
limits.
The choice between hard limit (which no process is allowed to
@@ -1777,6 +1777,9 @@ in use by a process (in kilobytes)
show or set the limit on how much memory a process can lock with
.Xr mlock 2
(in kilobytes)
+.It Fl r
+show or set the limit on the number of threads this user can
+have at one time
.It Fl p
show or set the limit on the number of processes this user can
have at one time