Author: dnicholson
Date: 2007-04-24 17:16:37 -0600 (Tue, 24 Apr 2007)
New Revision: 8109
Modified:
trunk/bootscripts/ChangeLog
trunk/bootscripts/lfs/init.d/functions
Log:
Sleep 0.1 seconds in killproc when checking process status
Modified: trunk/bootscripts/ChangeLog
===================================================================
--- trunk/bootscripts/ChangeLog 2007-04-24 20:51:47 UTC (rev 8108)
+++ trunk/bootscripts/ChangeLog 2007-04-24 23:16:37 UTC (rev 8109)
@@ -1,3 +1,11 @@
+2007-04-24 Dan Nicholson <[EMAIL PROTECTED]>
+ * lfs/init.d/functions: When killproc is executed, it checks that
+ the process is still running, sleeps if it is, then checks again.
+ The sleep is 1 second in between checks. By sleeping for 0.1 seconds
+ in between checks, killproc is much faster as it's wasting much
+ less time sleeping in the normal case that the process has died
+ after a short delay.
+
2007-04-16 Dan Nicholson <[EMAIL PROTECTED]>
* lfs/init.d/functions: Redirect stderr when using kill to suppress
output.
Modified: trunk/bootscripts/lfs/init.d/functions
===================================================================
--- trunk/bootscripts/lfs/init.d/functions 2007-04-24 20:51:47 UTC (rev
8108)
+++ trunk/bootscripts/lfs/init.d/functions 2007-04-24 23:16:37 UTC (rev
8109)
@@ -657,11 +657,13 @@
# Wait up to 3 seconds, for ${pid} to terminate
case "${killsig}" in
TERM|SIGTERM|KILL|SIGKILL)
- local dtime=${KILLDELAY}
+ # sleep in 1/10ths of seconds and
+ # multiply KILLDELAY by 10
+ local dtime="${KILLDELAY}0"
while [ "${dtime}" != "0" ]
do
kill -0 ${pid} 2>/dev/null || break
- sleep 1
+ sleep 0.1
dtime=$(( ${dtime} - 1))
done
# If ${pid} is still running, kill it
--
http://linuxfromscratch.org/mailman/listinfo/lfs-book
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page