This is synthesized from my threads on our forums:
I am trying to get silent shutdown support in gensplash for Arch, problem is that Arch kills the daemon almost straight away at shutdown using a killall command.
Is there anyway I can tell it not to kill the splash daemon or get a list of all processes and stop all of them but my daemon? Aside from that little prob it works great.
I tired restarting the daemon after the killall but that is a crap work around
This is the code i have to replace
Code:
# Terminate all processes
stat_busy "Sending SIGTERM To Processes"
/sbin/killall5 -15 &> /dev/null
/bin/sleep 5
stat_done
stat_busy "Sending SIGKILL To Processes"
/sbin/killall5 -9 &> /dev/null
/bin/sleep 1
stat_done
But it ain't so easy because:
Quote:
killall5 is the SystemV killall command. It sends a signal to all processes except kernel threads and the processes in its own session, so it won't kill the shell that is running the script it was called from. Its primary (only) use is in the rc scripts found in the /etc/init.d directory.
|
So, the way I see it i need to get a list of all procs and kill them all while preserving the same procs as killall5 AND preserving the splashutil daemon.