diff options
author | Bill Nottingham <notting@redhat.com> | 2005-10-03 21:38:03 +0000 |
---|---|---|
committer | Bill Nottingham <notting@redhat.com> | 2005-10-03 21:38:03 +0000 |
commit | ceeb0793906263dbb0af4653fce9d960fc5091ab (patch) | |
tree | 89bc8d1e27ab7f476267677ff0c7d70de7af0fc1 /rc.d/init.d | |
parent | 7205ca407d1101357f2878c31108c8b2786b5223 (diff) | |
download | initscripts-ceeb0793906263dbb0af4653fce9d960fc5091ab.tar initscripts-ceeb0793906263dbb0af4653fce9d960fc5091ab.tar.gz initscripts-ceeb0793906263dbb0af4653fce9d960fc5091ab.tar.bz2 initscripts-ceeb0793906263dbb0af4653fce9d960fc5091ab.tar.xz initscripts-ceeb0793906263dbb0af4653fce9d960fc5091ab.zip |
make sure corefile limiting works for user processes as well (#166511, <ville.skytta@iki.fi>)
Diffstat (limited to 'rc.d/init.d')
-rwxr-xr-x | rc.d/init.d/functions | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/rc.d/init.d/functions b/rc.d/init.d/functions index 660b4912..bf66d1ee 100755 --- a/rc.d/init.d/functions +++ b/rc.d/init.d/functions @@ -135,7 +135,7 @@ daemon() { [ -n "${pid:-}" -a -z "${force:-}" ] && return # make sure it doesn't core dump anywhere unless requested - ulimit -S -c ${DAEMON_COREFILE_LIMIT:-0} >/dev/null 2>&1 + corelimit="ulimit -S -c ${DAEMON_COREFILE_LIMIT:-0}" # if they set NICELEVEL in /etc/sysconfig/foo, honor it [ -n "$NICELEVEL" ] && nice="nice -n $NICELEVEL" @@ -145,9 +145,9 @@ daemon() { # And start it up. if [ -z "$user" ]; then - $nice /bin/bash -c "$*" + $nice /bin/bash -c "$corelimit >/dev/null 2>&1 ; $*" else - $nice runuser -s /bin/bash - $user -c "$*" + $nice runuser -s /bin/bash - $user -c "$corelimit >/dev/null 2>&1 ; $*" fi [ "$?" -eq 0 ] && success $"$base startup" || failure $"$base startup" } |