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

Home » Public Forums » archive » Re: Passing arguments at runtime
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: Passing arguments at runtime [message #31498 is a reply to message #31490] Tue, 23 July 2002 21:03 Go to previous message
Chris Mulliss is currently offline  Chris Mulliss
Messages: 5
Registered: March 2000
Junior Member
Try using environment variables to pass simple parameters into runtime
applications.


"Daniel Peduzzi" <peduzzi@attbi.com> wrote in message
news:aXV_8.127643$uw.72406@rwcrnsc51.ops.asp.att.net...
> My understanding is that the common (only?) method of passing parameters
> to an IDL program, restored at runtime using the IDL -rt option, is to
read them
> from a temporary file (e.g. "input.dat".) I've been using this technique
for years,
> and it works well for cases where there is no chance of the same "sav"
file being
> restored by multiple processes.
>
> However, dangers arise when multiple processes restore the same "sav"
> file, since the uniquely-named "input.dat" file is in danger of being read
> or changed by the wrong process.
>
> As an example: I have a c-shell script which is kicked off whenever a
data file
> appears in a directory. This can happen several times per hour. The
script
> takes the data file name, writes it to the temporary "input.dat" file, and
starts
> the IDL program which reads the data file name from "input.dat" and
immediately
> deletes "input.dat".
>
> To further protect against cases where the IDL program is restored by
parallel
> processes, I've tried to name the temporary file something unique, such as
> "input.$$" (where $$ denotes the process ID). Within the IDL program, I
get
> the most recently created input.* file via SPAWN, 'ls -1t input.*'. But
this can still
> fail when 2 or more processes are started at the same time.
>
> I was wondering how other folks have handled this situation, and if maybe
> there are other solutions which are not file-based and therefore prone to
> synchronization problems.
>
> Dan
>
> ---------------------------------------
> Daniel C. Peduzzi
> peduzzi@attbi.com
> ---------------------------------------
>
>
[Message index]
 
Read Message
Read Message
Previous Topic: Re: who teases happily, when Rachel scolds the sick raindrop under the ocean
Next Topic: Re: activeX?

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

Current Time: Sun Oct 12 01:05:07 PDT 2025

Total time taken to generate the page: 1.76167 seconds