]> git.pld-linux.org Git - projects/rc-scripts.git/commitdiff
- proper (shell dependant) ulimit use
authorJan Rękorajski <baggins@pld-linux.org>
Fri, 5 Oct 2001 18:17:13 +0000 (18:17 +0000)
committerJan Rękorajski <baggins@pld-linux.org>
Fri, 5 Oct 2001 18:17:13 +0000 (18:17 +0000)
svn-id: @949

rc.d/init.d/functions

index 53d96c48c5e8136f80c6b6f2f77ac2dcbfe1c3f6..369744c6ce74c65c3827e9137fea4956318ebf2d 100644 (file)
@@ -1,7 +1,7 @@
 # functions    This file contains functions to be used by most or all
 #              shell scripts in the /etc/init.d directory.
 #
-# $Id: functions,v 1.67 2001/09/19 08:09:56 orzech Exp $
+# $Id: functions,v 1.68 2001/10/05 18:17:13 baggins Exp $
 #
 # Author:      Miquel van Smoorenburg, <miquels@drinkel.nl.mugnet.org>
 # Hacked by:    Greg Galloway and Marc Ewing
@@ -271,9 +271,16 @@ daemon()
        # problems with the daemon, it also closes some security problems
        ulimit -c 0
 
-       # Make sure daemons will be able to fork. Limits are set via
-       # pam_limits. NOTE: this is ksh syntax - bash uses -u.
-       ulimit -p unlimited
+       # Make sure daemons will be able to fork.
+       # Limits are set via pam_limits.
+       if [ -n "$KSH_VERSION" ]; then
+               ulimit -p unlimited
+       elif [ -n "$ZSH_VERSION" ]; then
+               ulimit -u unlimited
+       elif [ -n "$BASH_VERSION" ]; then
+               ulimit -u unlimited
+#      elif [ -n "`$SH -c 'echo ${.sh.version}' 2>/dev/null`" ]; then
+       fi
 
        # And start it up.
        busy
This page took 0.243321 seconds and 4 git commands to generate.