Re: Set/reset DOS environment variable

new topic     » goto parent     » topic index » view thread      » older message » newer message

Creating a file would probably be the easiest way to do that.
OR using an initialztion file.  Read it and then update it
letting it know that you are running.  Then when you are
closing. Update it letting it know that you are No longer
running.  With an Running_ID you could have mutltiple
instances running and aware of each other.  Then when one
process was closing it would remove its ID from the stack
of currently running ID's.
Of Course.  You need to make sure that you have the file
closed while under normal operations.  Only open it long
enough to find the current running_ID's and then.
Another Idea of inter_process communication could be
allocating some memory.  But first they have to know if
another process is running.

I will build an example.  and send it to you OR if requested
I will send it to the list.

      Lucius L. Hilley III

On Fri, 12 Feb 1999 23:57:12 +0800, Arlie Codina <arlie.codina at USA.NET>
wrote:

>At 07:47 AM 2/12/99 -0400, you wrote:
>>At 04:57 a.m. 12-02-99 -0500, you wrote:
>>>How do you programatically set/reset DOS environment variable?
>>>
>>>I tried the following but didn't work:
>>>
>>>system( "SET MYVAR=02/08/1999", 2 )
>>>i = system_exec( "COMMAND /C SET MYVAR=02/08/1999", 2 )
>>>
>>>Can anyone help me on this.
>>>
>>>Arlie
>>
>>It won't work because the envoirment (the one use set on your autoexec.bat)
>>is different from the new shell you created.
>>
>>Why you need this? I have a 7-8 pages long C source that can do what you
>>need, but before typing and translating it to Euphoria I must be sure it's
>>the only alternative you need.
>>
>>Regards,
>>        Daniel   Berstein
>>        daber at pair.com
>>
>Hi Daniel,
>
>I want to use this for IPC (inter-process communication) so that a program
>can tell if an instance of itself is already running. Sort of TSR under
>windows 95. I thought that setting DOS env. var. was the simplest way to do
>it.
>
>Regards,
>Arlie Codina

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu