From 74c8015730e4ea8f1f90349ea969f977eae05b12 Mon Sep 17 00:00:00 2001 From: Alejandro Colomar Date: Fri, 2 Dec 2022 22:57:47 +0100 Subject: [PATCH] Assume RLIMIT_STACK is defined MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It is required by POSIX.1-2001. Cc: Christian Göttsche Signed-off-by: Alejandro Colomar --- libmisc/limits.c | 2 -- libmisc/pwd_init.c | 2 -- 2 files changed, 4 deletions(-) diff --git a/libmisc/limits.c b/libmisc/limits.c index 81b56b64..99518679 100644 --- a/libmisc/limits.c +++ b/libmisc/limits.c @@ -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) */ diff --git a/libmisc/pwd_init.c b/libmisc/pwd_init.c index c7cffba3..34940713 100644 --- a/libmisc/pwd_init.c +++ b/libmisc/pwd_init.c @@ -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);