idl process id [message #11556] |
Mon, 20 April 1998 00:00  |
csaute3
Messages: 10 Registered: March 1998
|
Junior Member |
|
|
This is my setup:
IDL> help, !version, /str
** Structure !VERSION, 4 tags, length=32:
ARCH STRING 'sparc'
OS STRING 'sunos'
OS_FAMILY STRING 'unix'
RELEASE STRING '4.0.1'
IDL> print, getenv('SHELL')
/bin/tcsh
IDL> print, getenv('TERM')
xterm
I know that I can grab the IP address of my terminal this way:
IDL> print, getenv('DISPLAY')
255.255.255.255:0.0
How would I easily grab the process ID of my IDL session?
255.255.255.255:0.0
How would I easily grab the process ID of my IDL session?
I don't want to do "ps | grep idl" because of the result.
IDL> spawn,'ps | grep idl',result,/sh
IDL> print, result
23847 pd S 0:02 /usr/local/rsi/idl_4/bin/bin.sunos.4.1/idl
23852 pd S 0:00 sh -c ps | grep idl 23853 pd S 0:00 grep idl
There is an option on spawn to return the process ID:
IDL> spawn,'ps | grep idl',result,/sh,pid=processid
IDL> help, processid
PROCESSID LONG = 23852
But pid is for the child process. I would like the process id for
the "parent process."
Cathy Campo
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/ Now offering spam-free web-based newsreading
|
|
|