killall doesn't work depending on how it's called
I've got a daemon that, when started manually from the command line as root, will eventually (after triggered) call killall5 and kill all running processes. But when the daemon is started as an init script in /etc/init.d, the killall5 doesn't actually kill anything when it is eventually triggered. I know the daemon runs, but the killall5 doesn't kill any processes. I know that killall5 excludes processes in it's own session, but as I noob I don't really understand how that helps me.
Looking at ps -ef for my daemon, when started thru the init scripts it looks like this:
root 5408 1 3 18:23 ? daemon_name
and of course PID 1 is init [3].
when started manually, the trace of the process which eventually leads back to init [3] is much longer. Parent PID of the daemon is -bash, parent of that is su -, parent of that is bash, parent of that is, sshd (I'm sshd in), ..., eventually back to init [3].
So what does the "except kernel threads and the processes in its own session" clarifier in killall5 mean and is it preventing me from killing processes when the daemon calls it when the daemon is started in /etc/init.d?
|