From 6cd3fc79724e9b7caa780bf98f9b9630c56bfcf9 Mon Sep 17 00:00:00 2001 From: Jeff Trawick Date: Wed, 15 Jan 2003 14:32:06 +0000 Subject: [PATCH] Change the ulimit command used by apachectl on AIX so that it works in all locales. the standard command fails in a non-English locale if the hard limit is unlimited since the display of the limit will translate "unlimited", but ulimit only accepts English "unlimited" on input git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@98277 13f79535-47bb-0310-9956-ffa450edef68 --- support/config.m4 | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/support/config.m4 b/support/config.m4 index ad52a8c03c..1fe2889dab 100644 --- a/support/config.m4 +++ b/support/config.m4 @@ -81,9 +81,20 @@ fi ]) APACHE_SUBST(checkgid_LTFLAGS) -if TMP_ULIMIT=`ulimit -H -n` && ulimit -S -n $TMP_ULIMIT ; then - APACHECTL_ULIMIT="ulimit -S -n \`ulimit -H -n\`" -else - APACHECTL_ULIMIT="" -fi +case $host in + *aix*) + # this works in any locale, unlike the command below, which + # fails in a non-English locale if the hard limit is unlimited + # since the display of the limit will translate "unlimited", but + # ulimit only accepts English "unlimited" on input + APACHECTL_ULIMIT="ulimit -S -n unlimited" + ;; + *) + if TMP_ULIMIT=`ulimit -H -n` && ulimit -S -n $TMP_ULIMIT ; then + APACHECTL_ULIMIT="ulimit -S -n \`ulimit -H -n\`" + else + APACHECTL_ULIMIT="" + fi + ;; +esac APACHE_SUBST(APACHECTL_ULIMIT) -- 2.40.0