Make the RLIMIT_NPROC resource limit of process 0 a kernel configuration

option; fixes PR kern/3702 from Havard Eidnes.  However, we avoid dealing with
the CHILD_MAX constant but let users specify MAXUPROC instead.
This commit is contained in:
kleink 1997-10-04 14:30:21 +00:00
parent 25916a62c6
commit 0398fdeea2
1 changed files with 9 additions and 2 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: param.h,v 1.37 1997/06/12 19:41:50 mrg Exp $ */
/* $NetBSD: param.h,v 1.38 1997/10/04 14:30:21 kleink Exp $ */
/*-
* Copyright (c) 1982, 1986, 1989, 1993
@ -70,13 +70,20 @@
#define MAXCOMLEN 16 /* max command name remembered */
#define MAXINTERP 64 /* max interpreter file name length */
#define MAXLOGNAME 16 /* max login name length */
#define MAXUPRC CHILD_MAX /* max simultaneous processes */
#define NCARGS ARG_MAX /* max bytes for an exec function */
#define NGROUPS NGROUPS_MAX /* max number groups */
#define NOFILE OPEN_MAX /* max open files per process */
#define NOGROUP 65535 /* marker for empty group set member */
#define MAXHOSTNAMELEN 256 /* max hostname size */
#ifndef MAXUPROC /* max simultaneous processes */
#define MAXUPROC CHILD_MAX /* POSIX 1003.1-compliant default */
#else
#if (MAXUPROC - 0) < CHILD_MAX
#error MAXUPROC less than CHILD_MAX. See options(4) for details.
#endif /* (MAXUPROC - 0) < CHILD_MAX */
#endif /* !defined(MAXUPROC) */
/* More types and definitions used throughout the kernel. */
#ifdef _KERNEL
#include <sys/cdefs.h>