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

Home » Public Forums » archive » 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 #11623 is a reply to message #11556] Fri, 24 April 1998 00:00 Go to previous messageGo to previous message
korpela is currently offline  korpela
Messages: 59
Registered: September 1993
Member
In article <353FB8D8.DE9@bial1.ucsd.edu>,
David Foster <foster@bial1.ucsd.edu> wrote:
>> IDL> result=call_external('/lib/libc.so.1.9','getpid')
>> IDL> print,result
>> 23847
>
> Whoa! Does this work in any general sense? Do you have suggestions
> for getting references on which routines are available in which
> libraries? How "safe" is this?

It works for any libc routine that either takes no parameters,
or takes zero or another small integer as the only parameter.
For example time(0) works. That's because call_external uses
an (argc,void *argv[]) calling system. In the above example
the actual call that made is "getpid(0,some_random_pointer)".
Since caller removes the arguments under most systems, this
works as an equivalent of getpid().

As far as where routines are found, most general unix routines
will be in libc. (i.e. anything that doesn't require libraries
to be listed on the command line during a C compile.)

Eric

--
Eric Korpela | An object at rest can never be
korpela@ssl.berkeley.edu | stopped.
<a href="http://sag-www.ssl.berkeley.edu/~korpela">Click for home page.</a>
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Data Handling
Next Topic: Re: Starting ftp from IDl

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

Current Time: Tue Apr 14 05:29:43 PDT 2026

Total time taken to generate the page: 1.67790 seconds