Module Name:    src
Committed By:   yamt
Date:           Sat Jun 29 04:52:55 UTC 2013

Modified Files:
        src/lib/libutil: login_cap.c
        src/share/man/man5: login.conf.5

Log Message:
add "maxthread" tunable to login.conf to adjust RLIMIT_NTHR.
PR/47626
ok'ed by christos


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/lib/libutil/login_cap.c
cvs rdiff -u -r1.26 -r1.27 src/share/man/man5/login.conf.5

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libutil/login_cap.c
diff -u src/lib/libutil/login_cap.c:1.30 src/lib/libutil/login_cap.c:1.31
--- src/lib/libutil/login_cap.c:1.30	Sat Apr  7 16:16:34 2012
+++ src/lib/libutil/login_cap.c	Sat Jun 29 04:52:55 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: login_cap.c,v 1.30 2012/04/07 16:16:34 christos Exp $	*/
+/*	$NetBSD: login_cap.c,v 1.31 2013/06/29 04:52:55 yamt Exp $	*/
 
 /*-
  * Copyright (c) 1995,1997 Berkeley Software Design, Inc. All rights reserved.
@@ -36,7 +36,7 @@
 
 #include <sys/cdefs.h>
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: login_cap.c,v 1.30 2012/04/07 16:16:34 christos Exp $");
+__RCSID("$NetBSD: login_cap.c,v 1.31 2013/06/29 04:52:55 yamt Exp $");
 #endif /* LIBC_SCCS and not lint */
  
 #include <sys/types.h>
@@ -420,6 +420,7 @@ static struct {
 	{ RLIMIT_RSS,		R_CSIZE, "memoryuse", },
 	{ RLIMIT_MEMLOCK,	R_CSIZE, "memorylocked", },
 	{ RLIMIT_NPROC,		R_CNUMB, "maxproc", },
+	{ RLIMIT_NTHR,		R_CNUMB, "maxthread", },
 	{ RLIMIT_NOFILE,	R_CNUMB, "openfiles", },
 	{ RLIMIT_CORE,		R_CSIZE, "coredumpsize", },
 	{ RLIMIT_SBSIZE,	R_CSIZE, "sbsize", },

Index: src/share/man/man5/login.conf.5
diff -u src/share/man/man5/login.conf.5:1.26 src/share/man/man5/login.conf.5:1.27
--- src/share/man/man5/login.conf.5:1.26	Mon Apr 30 11:07:28 2012
+++ src/share/man/man5/login.conf.5	Sat Jun 29 04:52:55 2013
@@ -1,4 +1,4 @@
-.\"	$NetBSD: login.conf.5,v 1.26 2012/04/30 11:07:28 njoly Exp $
+.\"	$NetBSD: login.conf.5,v 1.27 2013/06/29 04:52:55 yamt Exp $
 .\"
 .\" Copyright (c) 1995,1996,1997 Berkeley Software Design, Inc.
 .\" All rights reserved.
@@ -33,7 +33,7 @@
 .\"
 .\" BSDI login.conf.5,v 2.19 1998/02/19 23:39:39 prb Exp
 .\"
-.Dd November 18, 2008
+.Dd June 29, 2013
 .Dt LOGIN.CONF 5
 .Os
 .Sh NAME
@@ -167,6 +167,11 @@ Number of login attempts after which to 
 Maximum number of processes.
 .\"
 .sp
+.It Sy maxthread Ta number Ta "" Ta
+Maximum number of threads.
+First thread of each process are not counted against this.
+.\"
+.sp
 .It Sy memorylocked Ta size Ta "" Ta
 Maximum locked in core memory size limit.
 .\"

Reply via email to