I have a cron job that runs once a day. There are times when it runs that it disrupts other things on the computer, so I want to kill it. Under Mandriva I had no problems killing the process, and that was the end of that. Under Centos I cannot kill it with a sig 15 or a sig 9. Tonight the process would have trashed hours of work, so after spending two minutes as root trying to kill the process, I ended up killing the entire tree, including crond. Linux is supposed to allow CONTROL of things like this without rebooting, etc, so why can't I kill the process without killing crond?
Ted Miller
On Thu, 2006-09-21 at 22:14, Ted Miller wrote:
Scheduling something that may cause trouble sounds like a problem in its own right, but Centos shouldn't be doing anything special to keep signals from reaching processes. What kind of error do you get when you issue the kill command? If you aren't root or the process owner you shouldn't be permitted to send the signal. If you are, the process itself can trap it, but not signal 9. A kill -9 should stop anything unless it is hung up in a device driver.
On 22/09/06, Les Mikesell lesmikesell@gmail.com wrote:
I've seen zombied processes in the past that have been impossible to kill.
http://www.sm.luth.se/~alapaa/file_fetch/unixcdbookshelf/upt/ch24_19.htm
Is this process in state 'Z' under ps?
Will.
On Fri, 2006-09-22 at 11:17 +0100, Will McDonald wrote:
I've seen zombied processes in the past that have been impossible to kill.
Linux can't be that far removed from other *IX systems, can it? A Zombied process is one that is dead already. But the parent has not processed the "death of child" (usually/always(?) because the parent is dead or sleeping while waiting for some event that never comes.
Regardless, the zombie should be scary but really harmless, no? It can do nothing.
Being an older-timer, I'm subject to correction, of course.
http://www.sm.luth.se/~alapaa/file_fetch/unixcdbookshelf/upt/ch24_19.htm
Is this process in state 'Z' under ps?
Nothing in there makes me thing otherwise: a zombie is only scary. Bugs are, of course, excluded in this consideration.
Will.
<snip sig stuff>
My *guess*, Will, is that some related process got orphaned and overlooked when you/someone was trying to "terminate with prejudice" an offensive act.
-- Bill
Les Mikesell wrote:
No error message at all, that is what is so frustrating. The command line accepts the kill commands, but the process doesn't stop. Same if I use top to issue the commands. I can issue kill 15 or kill 9 for the process #, and it is as if nothing happened.
If you aren't root or the process owner you shouldn't be permitted to send the signal.
Logged in as root.
It is not hung up, it is executing as expected, (but I occasionally don't want that to execute).
Since nobody has any easy answers, maybe this makes a difference: The cron job is a shell script, and the line of the shell script that is executing while I attempt the shutdown is this:
/sbin/shutdown -kh +5
While that command won't hurt anything, it is what executes just after it that I am trying to abort (before it starts).
Ted Miller