Welcome to WebmasterWorld Guest from 3.94.129.211

Forum Moderators: bakedjake

Message Too Old, No Replies

kill script

     
3:49 pm on Mar 21, 2006 (gmt 0)

New User

10+ Year Member

joined:Sept 21, 2005
posts:30
votes: 0


no i dont have a grudge against anyone ;)

I have a java app that occasionally dies, and so i need to build in a check on my shutdown script to check if the java process is hanging and if it is I need to kill it.

Anyone have an idea?

3:50 pm on Mar 21, 2006 (gmt 0)

Administrator

WebmasterWorld Administrator jatar_k is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:July 24, 2001
posts:15756
votes: 0


shell script?
4:04 pm on Mar 21, 2006 (gmt 0)

New User

10+ Year Member

joined:Sept 21, 2005
posts:30
votes: 0


Yes, sorry.
4:08 pm on Mar 21, 2006 (gmt 0)

Senior Member

WebmasterWorld Senior Member trillianjedi is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Apr 15, 2003
posts:7256
votes: 3


I can think of two options:-

1. Tell it to stop.
2. Sleep for a bit
3. Grep the output of a PS AX
4. If it's still there issue a killall -9 ....

Or just (this one's ugly, but defensive ;-))

1. Tell it to stop.
2. Sleep for a bit.
3. Issue a killall -9 anyway.

To the best of my knowledge I don't believe that issuing a killall on a process that isn't actually running does any harm other than output an error to the console.

TJ

 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members