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=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,ca840b3ee1060e36,start X-Google-Attributes: gid103376,public From: Michael Reed Subject: Getting environment values in POSIX from terminated child process Date: 1998/08/04 Message-ID: <35C7583C.E71DBC7D@hercii.mar.lmco.com>#1/1 X-Deja-AN: 377905460 Content-Transfer-Encoding: 7bit Organization: Lockheed Martin Corporation Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 1998-08-04T00:00:00+00:00 List-Id: In Rational Apex, I've been utilizing a simple series of POSIX calls to execute UNIX scripts from within an ada program (I figured them out from an amalgam of previous postings to this group, particularly Kenneth Almquist's posting of how to execute a system command using POSIX. thank you! by the way...): The main calls within this procedure are: Start_Process(Child, "/bin/sh", Template, Arguments); followed by a Wait_For_Child_Process(Proc_Status, Child, Trace_Stopped => False, Masked_signals => All_Signals); 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? 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. At the moment the only way I know how to do that is to alter the error codes that are coming back... but I would prefer that the error status was used exclusively to return info on whether the process terminated abnormally or not. I thought that if I could put the relevant results into various environment variables and then access them from my ada program, it would be a more flexible way of passing information. Any suggestions? Michael Reed