I'm trying to discover the path of a running process (Codewarrior IDE 
7.2), and save it in a perl variable, so I will know where the 
application is located later.  (This way I will know where to launch it 
from if it is quit).

The only way I can think of doing this is by executing a ps command, and 
parsing the output.  However, there are some odd artifacts in the output.

If I run

ps -wwxocommand

I get, as part of the output:


/Volumes/CW 7.2 build tools/CodeWarrior 7.2/Metrowerks CodeWarrior/CodeWarrior IDE 
4.2.6 /Volumes/CW 7.2 build tools/CodeWarrior 7.2/Metrowerks CodeWarrior/CodeWarrior 
IDE 4.2.6 -psn_0_6684673

This is partialy correct, but I do not understand why the command path 
is repeated twice.  

Does anyone understand this output?

Does anyone know a better way to glean this information?


Thanks,

-Arshad

Reply via email to