Rikard, On Sunday 10 April 2005 06:42, Rikard Johnels wrote:
On Sunday 10 April 2005 15.08, Ken Schneider wrote:
On Sun, 2005-04-10 at 09:02 -0400, Louis Richards wrote:
On Saturday 09 April 2005 05:20 pm, Anders Norrbring wrote: If this is for a script, just start the program normaly and try somthing like:
azureus_pid=`/bin/ps -C azureus -o pid=` kill $azureus_pid
If the name of the process shows up with the ps command than just use killproc <process name> to kill it. man killproc gives more detail.
-- Ken Schneider
Azureus starts a number of threads. so just ps'ing for it wont help. You'll get anywhere from one to x number of pid:s
That's only true if you're still running a 2.4-series kernel. In 2.6 the threading works differently and you don't see a separate process table entry or ps output line for each thread. By the way, all Java programs have at least two threads, the main one and the garbage collector thread.
You COULD start it by adding "&" to the line
box:> java -jar jarfile.jar &
[1] 1861 box:>
It gives the job number and the PID
In that case, the most expedient way to access the PID of the newly created process is the $! variable.
/Rikard
Randall Schulz