comp.lang.idl-pvwave archive - RDF feed
type: channel
description: Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado
items: Re: How to obtain the process ID of the current IDL process in a platform-independent way?

Re: How to obtain the process ID of the current IDL process in a platform-independent way?
type: item
description: On Sep 4, 4:08 am, tcburt <tcb...@rochester.rr.com> wrote: > IDLUnix> pid = call_external(!dlm_path+'/libidl.so', 'getpid', /cdecl) FWIW: this one works on Linux. Maarten
creator: Maarten[1]
date: 2009-09-04T08:20:41-00:00

Re: How to obtain the process ID of the current IDL process in a platform-independent way?
type: item
description: On Sep 4, 4:20 am, Maarten <maarten.sn...@knmi.nl> wrote: > On Sep 4, 4:08 am, tcburt <tcb...@rochester.rr.com> wrote: > >> IDLUnix> pid = call_external(!dlm_path+'/libidl.so', 'getpid', /cdecl) > > FWIW: this one works on Linux. > > Maarten That is good data and a welcome result. Thank you for testing. Tim
creator: tcburt
date: 2009-09-04T10:54:51-00:00

Re: How to obtain the process ID of the current IDL process in a platform-independent way?
type: item
description: On Sep 4, 2:25 am, Michael Galloy <mgal...@gmail.com> wrote: > tcburt wrote: >> *** Question >> Is there a platform-independent "IDL way" to obtain the process ID of >> the current IDL process? > >> *** Background >> I need the process ID (PID) of the current IDL process. Currently I >> have a working solution for a specific platform (Solaris 9 and 10), >> specifically >> IDLUnix> pid = CALL_EXTERNAL("/lib/sparcv9/libc.so", 'getpid') >> The reliance on a library from the operating system library limits the >> applicability to that particular platform and installation, so I >> consider it only a provisional solution. > >> A recent discovery is the Unix libidl.so library that is in the IDL >> (v6.4 and v7.0) installation directory. Dumping the contents with >> shellUnix> elfdump -s libidl.so | less >> revealed the existence of a 'getpid' function that returns the PID via >> IDLUnix> pid = call_external(!dlm_path+'/libidl.so', 'getpid', / >> cdecl) >> This is one step towards platform independence since the library is >> from IDL rather than the operating system and its location is stored >> in an IDL system variable. I have not yet tested on anything but the >> Solaris 10 systems, so this may not work on other Unix systems >> (e.g. linux). > >> I then turned to a Windows installation of IDL (v 6.2) and did not >> find a library called libidl.dll in the !dlm_path, but did find >> idl32.dll. I guessed[*] that this library would have 'getpid' as the >> entry symbol, so I tried >> IDLWindows> pid = call_external(!dlm_path+'\idl32.dll', 'getpid', / >> cdecl) >> The resulting error >> % CALL_EXTERNAL: Error loading sharable executable. >> indicates that the problems go deeper than just whether the symbol is >> in the library. Even if the call_external() had worked under Windows, >> the method could have potential problems with internal changes to IDL >> (e.g. library name change from idl32.dll to idl.dll). > >> I seek the "IDL way" to obtain the PID. Searches in idlhelp, >>…
creator: tcburt
date: 2009-09-04T11:13:12-00:00