Article View: comp.sys.amiga.tech
Article #2351putenv/getenv problem (was Re: Ash 1.1 available (already! :-))
From: Martin Brenner
Date: Mon, 27 Nov 1989 13:57
Date: Mon, 27 Nov 1989 13:57
34 lines
1873 bytes
1873 bytes
gregg@cbnewsc.ATT.COM (gregg.g.wonderly) writes:
>From article <13920014@hpfelg.HP.COM>, by koren@hpfelg.HP.COM (Steve Koren):
>>> However, a bug in either the compiler or OS is still
>>> preventing 'getenv' from working correctly. I have
>>
>> One thing I forgot to mention; even though Ash's getenv has problems,
>> (since I can't get the Lattice call to work)...
>The routine works fine for me under 5.02. The documentation is just not
>clear. E.g. for the ENVariable $HOME, create the file, env:home, and
>put the string value for the variable in that file as a single line.
>I put the string "usr:gregg" in mine...
Yes, its not working as described. The following works correctly:
main() {
char *xy;
putenv("test=xy\n"); /* note the \n ! */
xy = getenv("test");
printf("test: %s\n",xy);
}
BTW: Anybody has an idea how to implement private environment variables?
I want to system() another program that inherits stdin and stdout and also
uses the same environment has the calling program. Hints welcome!
Greetinx,
-Martin
--
M a r t i n B r e n n e r Uni Ulm, Abt. Exp. Physik
X.400: <G=martin;S=brenner;OU=ruf;P=uni-freiburg;A=dbp;C=de>
Sub: martin@deepth.UUCP Bitnet: brennerm@dulruu51
Technical Details
Message-ID:
<1989Nov27.135754.12776@sun1.ruf.uni-freiburg.de>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!samsung!think!snorkelwacker!ira.uka.de!sun1.ruf.uni-freiburg.de!brennerReferences:
<13920014@hpfelg.HP.COM> <5050@cbnewsc.ATT.COM>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!samsung!think!snorkelwacker!ira.uka.de!sun1.ruf.uni-freiburg.de!brenner From: brenner@sun1.ruf.uni-freiburg.de (Martin Brenner) Newsgroups: comp.sys.amiga.tech Subject: putenv/getenv problem (was Re: Ash 1.1 available (already! :-)) Keywords: lattice getenv Message-ID: <1989Nov27.135754.12776@sun1.ruf.uni-freiburg.de> Date: 27 Nov 89 13:57:54 GMT References: <13920014@hpfelg.HP.COM> <5050@cbnewsc.ATT.COM> Organization: Rechenzentrum der Universitaet Freiburg, Deutschland Lines: 34