Killall5 sometimes can leave some dangling processes. You may want to use pkill 
as an alternative or with killall5 after the killall5 sequence.

pkill --inverse -s0,1 -TERM
sleep 3
pkill --inverse -s0,1 -KILL
sleep 3

This will collapse the entire process tree if any processes are left behind, 
especially if you use a file system as /(root) like JFS that deals with 
copy-on-write.

You get pkill with procps-ng.

Hope this helps.

Sent from my Windows Phone
________________________________
From: Steve Litt<mailto:[email protected]>
Sent: ‎6/‎9/‎2015 7:24 AM
To: [email protected]<mailto:[email protected]>
Subject: Shutdown/reboot script order?

Hi all,

I know the last part of system shutdown or reboot, after I've killed my
daemontools-supervised processes, has the following features:

* killall5 -15; sleep 2; killall5 -9; sleep 2

* umount -a

* mount -o remount,ro /dev/sda1

* /sbin/halt or /sbin/reboot

Could somebody confirm which order these things come in?

Thanks,

SteveT

Steve Litt
June 2015 featured book: The Key to Everyday Excellence
http://www.troubleshooters.com/key

Reply via email to