From: Jing Guo <guo@dao.gsfc.nasa.gov>
Newsgroups: comp.parallel.mpi
Subject: Re: Environment variables under MPI()? (a correction)
Date: Wed, 26 Aug 1998 18:40:24 -0400
Organization: NASA Goddard Space Flight Center -- Greenbelt, Maryland USA
Message-Id: <35E48ED8.4487@dao.gsfc.nasa.gov>
References: <35E1994A.794B@dao.gsfc.nasa.gov>
    <6rsefh$a7l@news1.newsguy.com> <35E347C1.ABD@dao.gsfc.nasa.gov>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit


I wrote:
> 
> One might do it with **argv, or do it with a hardwired file, but just
> _can_not_ do it from env. (which is far simpler and more flexible for
> programers).
> 
> Given the portability of getenv() from the root, one still can not get
> all given environment variables without dumping them to a file first,
> since there is no OS interface to get _all_ environment variables
> without knowing their keys.  ...

Someone from NASA Lewis Research Center has corrected me through email, 
that given POSIX, the environment array can be accessed through

  extern char **environ;

I was not aware of that.  And I thank him for the suggestion.

Jing
-- 
________________________________ _-__-_-_ _-___---
Jing Guo, guo@dao.gsfc.nasa.gov, (301)805-8333(o), (301)805-7960(fx)
Data Assimilation Office, Code 910.3, NASA/GSFC, Greenbelt, MD 20771

