comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: idl process id
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: idl process id [message #11545 is a reply to message #11543] Tue, 21 April 1998 00:00 Go to previous messageGo to previous message
L. Paul Mix is currently offline  L. Paul Mix
Messages: 8
Registered: July 1996
Junior Member
csaute3@alumni.umbc.edu wrote:
>
> This is my setup:

> 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

Try:
spawn, 'echo $$', pid
print, pid(0)

This will not work with Windows or MAC.

Paul Mix
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: object creation question
Next Topic: Re: Question. CW_PDMENU

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sun Nov 30 04:30:19 PST 2025

Total time taken to generate the page: 0.01701 seconds