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

Home » Public Forums » archive » getpid in Mac Os X
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
getpid in Mac Os X [message #39789] Fri, 11 June 2004 06:53 Go to next message
Miguel Angel Cordoba is currently offline  Miguel Angel Cordoba
Messages: 13
Registered: April 2004
Junior Member
Hi,
I want to get the process identification (pid) of my IDL. In
Linux I get the pid calling:

pid=CALL_EXTERNAL('/usr/lib/i686/libc.so.6','getpid')

but this library doesn't exist in Mac Os X. I had probed with
the '/usr/lib/libc.dylib' but didn't work. Any ideas?

IDL>pid=CALL_EXTERNAL('/usr/lib/libc.dylib','getpid')
% CALL_EXTERNAL: Error loading sharable exectuble.
Symbol: getpid, FILE=/usr/lib/libc.dylib
not a Mach-O MH-BUNDLE file type

Thanks a lot.

--
_________________________________________________________
Miguel Angel Cordoba
---------------------------------------------------------
Grup de Recerca Aplicada en Hidrometeorologia (GRAHI-UPC)
http://www.grahi.upc.es
---------------------------------------------------------
Centre membre de la Xarxa d'Innovacio Tecnologica XIT
http://www.cidem.com/xarxait
_________________________________________________________
Re: getpid in Mac OS X [message #39885 is a reply to message #39789] Tue, 15 June 2004 09:22 Go to previous message
MKatz843 is currently offline  MKatz843
Messages: 98
Registered: March 2002
Member
> Any ideas?. Thank you.

Here's what I do. Every time I run IDL, I run a startup procedure that
sets certain system variables and such. You can create a !PID system
variable.

1) As IDL is starting up, use the methods outlined previously to find
all IDL PIDs.
2) Choose the highest numbered PID and assign that to !PID

Then for the duration of your IDL session, each IDL job will know its
own PID.

M. Katz
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: DLM and Code fragments
Next Topic: range ordering of triangular facets

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

Current Time: Sun Oct 12 09:27:30 PDT 2025

Total time taken to generate the page: 1.68211 seconds