From 8af1ed165c23e2913c9875a7913abcd91dee96f3 Mon Sep 17 00:00:00 2001 From: christos Date: Sat, 9 Jun 2012 02:50:43 +0000 Subject: [PATCH] support RLIMIT_NTHR --- bin/csh/func.c | 5 +++-- bin/ksh/c_ulimit.c | 7 +++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/bin/csh/func.c b/bin/csh/func.c index c0819883162d..f7a72c272bfa 100644 --- a/bin/csh/func.c +++ b/bin/csh/func.c @@ -1,4 +1,4 @@ -/* $NetBSD: func.c,v 1.38 2011/08/31 16:24:54 plunky Exp $ */ +/* $NetBSD: func.c,v 1.39 2012/06/09 02:50:43 christos Exp $ */ /*- * Copyright (c) 1980, 1991, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)func.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: func.c,v 1.38 2011/08/31 16:24:54 plunky Exp $"); +__RCSID("$NetBSD: func.c,v 1.39 2012/06/09 02:50:43 christos Exp $"); #endif #endif /* not lint */ @@ -1104,6 +1104,7 @@ static const struct limits { { RLIMIT_RSS, "memoryuse", 1024, "kbytes" }, { RLIMIT_MEMLOCK, "memorylocked", 1024, "kbytes" }, { RLIMIT_NPROC, "maxproc", 1, "" }, + { RLIMIT_NTHR, "maxthread", 1, "" }, { RLIMIT_NOFILE, "openfiles", 1, "" }, { RLIMIT_SBSIZE, "sbsize", 1, "bytes" }, { RLIMIT_AS, "vmemoryuse", 1024, "kbytes" }, diff --git a/bin/ksh/c_ulimit.c b/bin/ksh/c_ulimit.c index b24c94fd6262..92c3fadf6404 100644 --- a/bin/ksh/c_ulimit.c +++ b/bin/ksh/c_ulimit.c @@ -1,4 +1,4 @@ -/* $NetBSD: c_ulimit.c,v 1.9 2008/09/14 05:00:23 sjg Exp $ */ +/* $NetBSD: c_ulimit.c,v 1.10 2012/06/09 02:51:50 christos Exp $ */ /* ulimit -- handle "ulimit" builtin @@ -20,7 +20,7 @@ #include #ifndef lint -__RCSID("$NetBSD: c_ulimit.c,v 1.9 2008/09/14 05:00:23 sjg Exp $"); +__RCSID("$NetBSD: c_ulimit.c,v 1.10 2012/06/09 02:51:50 christos Exp $"); #endif @@ -100,6 +100,9 @@ c_ulimit(wp) #ifdef RLIMIT_NPROC { "processes", RLIMIT, RLIMIT_NPROC, RLIMIT_NPROC, 1, 'p' }, #endif +#ifdef RLIMIT_NTHR + { "threads", RLIMIT, RLIMIT_NTHR, RLIMIT_NTHR, 1, 'r' }, +#endif #ifdef RLIMIT_VMEM { "vmemory(kbytes)", RLIMIT, RLIMIT_VMEM, RLIMIT_VMEM, 1024, 'v' }, #else /* RLIMIT_VMEM */