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
where is the killall taking place? In an rc.d script?
You could probably do some serious grepping and string massaging to get at the invidual pid's
"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍
s 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?
something like pgrep and pkill ?
pgrep -v xmms
will list all processes id without xmms p. id
the same I think work with pkill, but I don't want to try :]
This is the code i have to replace
# 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:
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.
OR if I understand correctly, i can call the daemon directly from the rc.shutdown script and killall5 won't kill it? At the mo it is called in a remote script?