|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
AT&T devCentral & BlackBerry(r) Webcast Series: BlackBerry and GPS -Build Location Awareness into your BlackBerry Applications, July 10th-1:00PM EST. Register Today!
|
|
#1
|
|||
|
|||
|
Capturing process ID of app at launch
I'm trying to find a way from the shell to capture the process ID of an app as I launch it. I can't just launch it and then grep for processes with that app's name, because other copies of the app may already be running. I need a way to grab the ID as the app is launched. No one that I've talked to here at work can think of a way to do this.
Anyone have any ideas? |
|
#2
|
||||
|
||||
|
they why not grep for processes with that app's name and get the one with the highest PID?
christo
__________________
. Spiration channels: Free scripts, programming tutorials and articles Dotcut alerts: Online Press cuttings / news alerts Clearprop: UK microlight school, wiltshire Uk dating: UK safe dating with Topdates About Christo . . |
|
#3
|
|||
|
|||
|
You can also query PIDs from all apps invoked from the same shell with
jobs -l the latest process will be the last of the list. Just add this line after you start every app instance. Quote:
|
![]() |
| Viewing: Dev Shed Forums > Operating Systems > UNIX Help > Capturing process ID of app at launch |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|