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