Kubuntu/Ubuntu does not remove everything from memory at shutdown

Jonas Norlander jonorland at gmail.com
Sat Mar 13 11:36:59 UTC 2010


On 13 March 2010 01:41, Steve Morris <samorris at netspace.net.au> wrote:
> On 13/03/10 06:14, Reinhold Rumberger wrote:
>> On Friday 12 March 2010, Dotan Cohen wrote:
>> /etc/init.d/killprocs (slightly adapted to my max line length):
>> do_start () {
>>         # Kill all processes.
>>         log_action_begin_msg \
>>             "Asking all remaining processes to terminate"
>>         killall5 -15 # SIGTERM
>>         log_action_end_msg 0
>>         alldead=""
>>         for seq in 1 2 3 4 5 6 7 8 9 10; do
>>                 # use SIGCONT/signal 18 to check if there are
>>                 # processes left.  No need to check the exit code
>>                 # value, because either killall5 work and it make
>>                 # sense to wait for processes to die, or it fail and
>>                 # there is nothing to wait for.
>>
>>                 if killall5 -18 ; then
>>                     :
>>                 else
>>                     alldead=1
>>                     break
>>                 fi
>>
>>                 sleep 1
>>         done
>>         if [ -z "$alldead" ] ; then
>>             log_action_begin_msg "Killing all remaining processes"
>>             killall5 -9 # SIGKILL
>>             log_action_end_msg 1
>>         else
>>             log_action_begin_msg \
>>                 "All processes ended within $seq seconds."
>>             log_action_end_msg 0
>>         fi
>> }
>>
>> Note how all those "log_action_begin_msg" commands log what is going
>> on in greater detail than most init scripts do.
>>
>>
>
> I looked at the /etc/rc6.d/S20sendsigs which are the scripts that get
> processed at shutdown. This script is very similar to what you have listed
> above, but as far as I can see it is issuing invalid killall5 commands that
> are invalid.

It looks like sendsigs and killprocs using the same procedure to
terminate processes I don't know why there is two scripts like this
but non of them looks to do anything wrong as far as I understand. In
what way is killall5 used wrong?

/ Jonas




More information about the kubuntu-users mailing list