Assume RLIMIT_AS is defined
It is required by POSIX.1-2001. Cc: Christian Göttsche <cgzones@googlemail.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
This commit is contained in:
parent
e1a39e1dfc
commit
7a4906fc75
@ -239,13 +239,11 @@ static int do_user_limits (const char *buf, const char *name)
|
||||
|
||||
while ('\0' != *pp) {
|
||||
switch (*pp++) {
|
||||
#ifdef RLIMIT_AS
|
||||
case 'a':
|
||||
case 'A':
|
||||
/* RLIMIT_AS - max address space (KB) */
|
||||
retval |= setrlimit_value (RLIMIT_AS, pp, 1024);
|
||||
break;
|
||||
#endif
|
||||
case 'c':
|
||||
case 'C':
|
||||
/* RLIMIT_CORE - max core file size (KB) */
|
||||
|
@ -32,9 +32,8 @@ void pwd_init (void)
|
||||
setrlimit (RLIMIT_CORE, &rlim);
|
||||
|
||||
rlim.rlim_cur = rlim.rlim_max = RLIM_INFINITY;
|
||||
#ifdef RLIMIT_AS
|
||||
setrlimit (RLIMIT_AS, &rlim);
|
||||
#endif
|
||||
|
||||
#ifdef RLIMIT_CPU
|
||||
setrlimit (RLIMIT_CPU, &rlim);
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user