From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_20,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,ca840b3ee1060e36 X-Google-Attributes: gid103376,public From: Lieven Marchand Subject: Re: Getting environment values in POSIX from terminated child process Date: 1998/08/08 Message-ID: <6qi08p$kr3$1@xenon.inbe.net>#1/1 X-Deja-AN: 379187945 References: <35C7583C.E71DBC7D@hercii.mar.lmco.com> Organization: Only under extreme pressure! Newsgroups: comp.lang.ada Date: 1998-08-08T00:00:00+00:00 List-Id: Michael Reed 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 ------------------------------------------------------------------------------ Few people have a talent for constructive laziness. -- Lazarus Long