Re: Faster shutdown and the ubuntu "multiuser" update-rc.d extention
On Fri, Jan 04, 2008 at 12:01:17AM +0100, Petter Reinholdtsen wrote:
> # 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.
> - killall5 -18 $OMITPIDS || break
> + if killall5 -18 $OMITPIDS ; then
Why is it using -18? Please change that to SIGCONT, it depends on the
arch what the value should be. See signal(7), which even mentions that
that is different for ppc/i386.
> - log_action_begin_msg "Killing all remaining processes"
> - killall5 -9 $OMITPIDS # SIGKILL
> - log_action_end_msg 0
> + if [ -z "$alldead" ] ; then
> + log_action_begin_msg "Killing all remaining processes"
> + killall5 -9 $OMITPIDS # SIGKILL
> + log_action_end_msg 0
> + fi
I think it would be nice that in case it needs to send KILL
for debug purpuses it could:
- output which processes are still running
- have some sort of delay before it turns the box off/reboots.