Assume RLIMIT_STACK 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
c916715a6c
commit
74c8015730
@ -305,13 +305,11 @@ static int do_user_limits (const char *buf, const char *name)
|
||||
retval |= setrlimit_value (RLIMIT_RSS, pp, 1024);
|
||||
break;
|
||||
#endif
|
||||
#ifdef RLIMIT_STACK
|
||||
case 's':
|
||||
case 'S':
|
||||
/* RLIMIT_STACK - max stack size (KB) */
|
||||
retval |= setrlimit_value (RLIMIT_STACK, pp, 1024);
|
||||
break;
|
||||
#endif
|
||||
case 't':
|
||||
case 'T':
|
||||
/* RLIMIT_CPU - max CPU time (MIN) */
|
||||
|
@ -41,9 +41,7 @@ void pwd_init (void)
|
||||
#ifdef RLIMIT_RSS
|
||||
setrlimit (RLIMIT_RSS, &rlim);
|
||||
#endif
|
||||
#ifdef RLIMIT_STACK
|
||||
setrlimit (RLIMIT_STACK, &rlim);
|
||||
#endif
|
||||
|
||||
signal (SIGALRM, SIG_IGN);
|
||||
signal (SIGHUP, SIG_IGN);
|
||||
|
Loading…
Reference in New Issue
Block a user