2000-03-26 Roland McGrath <roland@baalperazim.frob.com>

* hurd/hurdrlimit.c (init_rlimit): Give the RLIMIT_NOFILE soft limit
	an initial value of 1024 instead of RLIM_INFINITY.
This commit is contained in:
Roland McGrath 2000-03-26 19:16:56 +00:00
parent 4fcddf8e57
commit 8acd0bf21b

View File

@ -1,5 +1,5 @@
/* Resource limits. /* Resource limits.
Copyright (C) 1994, 1995, 1997 Free Software Foundation, Inc. Copyright (C) 1994,95,97,2000 Free Software Foundation, Inc.
This file is part of the GNU C Library. This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or The GNU C Library is free software; you can redistribute it and/or
@ -42,7 +42,16 @@ init_rlimit (void)
if (_hurd_rlimits[i].rlim_max == 0) if (_hurd_rlimits[i].rlim_max == 0)
_hurd_rlimits[i].rlim_max = RLIM_INFINITY; _hurd_rlimits[i].rlim_max = RLIM_INFINITY;
if (_hurd_rlimits[i].rlim_cur == 0) if (_hurd_rlimits[i].rlim_cur == 0)
_hurd_rlimits[i].rlim_cur = _hurd_rlimits[i].rlim_max; #define I(lim, val) case RLIMIT_##lim: _hurd_rlimits[i].rlim_cur = (val); break
switch (i)
{
I (NOFILE, 1024); /* Linux 2.2.12 uses this initial value. */
default:
_hurd_rlimits[i].rlim_cur = _hurd_rlimits[i].rlim_max;
break;
}
#undef I
} }
(void) &init_rlimit; (void) &init_rlimit;