]> granicus.if.org Git - apache/commitdiff
Change the ulimit command used by apachectl on AIX so that it
authorJeff Trawick <trawick@apache.org>
Wed, 15 Jan 2003 14:32:06 +0000 (14:32 +0000)
committerJeff Trawick <trawick@apache.org>
Wed, 15 Jan 2003 14:32:06 +0000 (14:32 +0000)
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

index ad52a8c03c271f0717beaa6c130bb70196c764cf..1fe2889dab8441eb1c53b0df716c8565435a8449 100644 (file)
@@ -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)