diff options
author | Roland McGrath <roland@gnu.org> | 2000-03-26 19:16:56 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 2000-03-26 19:16:56 +0000 |
commit | 8acd0bf21b6092706447a72fc8d39951872d7a2b (patch) | |
tree | 3eed219597be10973063ff176cc0cb8307df6085 /hurd/hurdrlimit.c | |
parent | 4fcddf8e57fa96dcf8759d95b5e427bd0cff69b5 (diff) | |
download | glibc-8acd0bf21b6092706447a72fc8d39951872d7a2b.tar glibc-8acd0bf21b6092706447a72fc8d39951872d7a2b.tar.gz glibc-8acd0bf21b6092706447a72fc8d39951872d7a2b.tar.bz2 glibc-8acd0bf21b6092706447a72fc8d39951872d7a2b.zip |
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.
Diffstat (limited to 'hurd/hurdrlimit.c')
-rw-r--r-- | hurd/hurdrlimit.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/hurd/hurdrlimit.c b/hurd/hurdrlimit.c index e7512ac600..874cf87072 100644 --- a/hurd/hurdrlimit.c +++ b/hurd/hurdrlimit.c @@ -1,5 +1,5 @@ /* 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. 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) _hurd_rlimits[i].rlim_max = RLIM_INFINITY; 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; |