comp.lang.ada
 help / color / mirror / Atom feed
From: Lieven Marchand <mal@bewoner.dma.be>
Subject: Re: Getting environment values in POSIX from terminated child process
Date: 1998/08/08
Date: 1998-08-08T00:00:00+00:00	[thread overview]
Message-ID: <6qi08p$kr3$1@xenon.inbe.net> (raw)
In-Reply-To: 35C7583C.E71DBC7D@hercii.mar.lmco.com

Michael Reed <mreed@hercii.mar.lmco.com> writes:

> What I was wondering was, after the completion of the process, is there
> any way I can still get my hands on the environment variables associated
> with that process?  Is there some function call I can make on
> Proc_Status for instance (a Termination_Status variable by the way) that
> will return me the final environment associated with that process?

No. Once the process is finished the environment is gone. 

> 
> The reason I'm trying to figure this out is that I want to be able to
> pass information from my script back to my program.  

> Any suggestions?

* Put it in a temporary file and read the file back in. Beware of race 
conditions, multiple invocations of your program etc.

* Inter process communication. Since you work in a POSIX environment 
use one of the IPC facilities: named pipes, shared memory, sockets, ...
If you have control of the program your Ada program is executing you can
choose any of these. If you don't, giving the external program an option
to give its output into a named pipe should work.

-- 
Lieven Marchand <mal@bewoner.dma.be> 
------------------------------------------------------------------------------
Few people have a talent for constructive laziness. -- Lazarus Long




      reply	other threads:[~1998-08-08  0:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-08-04  0:00 Getting environment values in POSIX from terminated child process Michael Reed
1998-08-08  0:00 ` Lieven Marchand [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox