Changeset 8109

Show
Ignore:
Timestamp:
04/24/07 17:16:37 (1 year ago)
Author:
dnicholson
Message:

Sleep 0.1 seconds in killproc when checking process status

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/bootscripts/ChangeLog

    r8075 r8109  
     12007-04-24      Dan Nicholson   <dnicholson@linuxfromscratch.org> 
     2        * lfs/init.d/functions: When killproc is executed, it checks that 
     3          the process is still running, sleeps if it is, then checks again. 
     4          The sleep is 1 second in between checks. By sleeping for 0.1 seconds 
     5          in between checks, killproc is much faster as it's wasting much 
     6          less time sleeping in the normal case that the process has died 
     7          after a short delay. 
     8 
    192007-04-16      Dan Nicholson   <dnicholson@linuxfromscratch.org> 
    210        * lfs/init.d/functions: Redirect stderr when using kill to suppress 
  • trunk/bootscripts/lfs/init.d/functions

    r8075 r8109  
    658658                case "${killsig}" in 
    659659                TERM|SIGTERM|KILL|SIGKILL) 
    660                         local dtime=${KILLDELAY} 
     660                        # sleep in 1/10ths of seconds and 
     661                        # multiply KILLDELAY by 10 
     662                        local dtime="${KILLDELAY}0" 
    661663                        while [ "${dtime}" != "0" ] 
    662664                        do 
    663665                                kill -0 ${pid} 2>/dev/null || break 
    664                                 sleep
     666                                sleep 0.
    665667                                dtime=$(( ${dtime} - 1)) 
    666668                        done