Re: Killing Ant process through shell script when multiple Java processes are running...

2009-11-25 Thread Brian Pontarelli
On Nov 25, 2009, at 3:06 AM, robert lazarski wrote: > On Wed, Nov 25, 2009 at 6:49 AM, Harry_ wrote: >> >> And one more thing I would like to ask is about how to get the list of >> processes created by a process. I want this to make sure that all the >> processes created by parent ant process a

Re: Killing Ant process through shell script when multiple Java processes are running...

2009-11-25 Thread robert lazarski
On Wed, Nov 25, 2009 at 6:49 AM, Harry_ wrote: > > And one more thing I would like to ask is about how to get the list of > processes created by a process. I want this to make sure that all the > processes created by parent ant process are also killed once I Killed ant > process. Any way ant can w

Re: Killing Ant process through shell script when multiple Java processes are running...

2009-11-25 Thread Harry_
Thanks for the reply... I am working on Ubuntu and I did the following: While running the ant I output the PID into a file like: ant -f perf_NormalLoad.xml & echo $! > /tmp/java.pid For stopping the process I used: PIDFILE=`cat /home/singhh/tt/java.pid` echo 'Killing Java process from PID fi

Re: Killing Ant process through shell script when multiple Java processes are running...

2009-11-24 Thread Brian Pontarelli
It will depend on the OS that you are running and grabbing the PID. In most unix systems, the PID of the last executed process is in the variable $!. You can store this in a file for later retrieval if necessary. You can also add a very specific -D property and then use a combination of the ps,

Re: Killing Ant process through shell script when multiple Java processes are running...

2009-11-24 Thread Scot P. Floess
what about pkill on the ant process itself? On Tue, 24 Nov 2009, Harry_ wrote: Hello, I want to schedule a task using ant using crontab. On shell script will start the ant and the task I want to run. This is easy. One shell script will kill the above ant process. But the problem is that m