🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.msdos.programmer
Article #780

Help! Environment variables

#780
From: Hans Beckerus LG/THB
Date: Wed, 15 Apr 1992 07:16
24 lines
1454 bytes
Yet another problem I cannot solve. 

I'm trying to set an environment variable from a C program
that should be used in the primary shell. I've tried the
TC/C++ function 'putenv ()' and it works fine aslong as I'm
not leaving the program. Somehow it must be possible to set the 
variable so that it is stored in the primary shell and not lost
when the program exits. I've also tried the third parameter with
main (argn, argv, env) in a foolish attempt to get the array
pointer from the startup shell, but no luck. 

I hope someone can help me. Any code examples or suggestions
are welcome, I'm really stuck on this one.


   Cheers!

________________________________________________________________________________
Hans Beckerus                  Phone  : +46 8 719 59 60     
Ericsson Telecom AB            Memo   : ETX.ETXERUS
AXE System Design              E-mail : etxerus@james.ericsson.se
126 25 Stockholm
SWEDEN
Technical Details
Message-ID: <1992Apr15.071624.4484@ericsson.se>
Path: arc1-ca.pugleaf.net!sparky!uunet!math.fu-berlin.de!news.netmbx.de!Germany.EU.net!mcsun!mcsun!seunet!ericom!james.ericsson.se!etxerus

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!math.fu-berlin.de!news.netmbx.de!Germany.EU.net!mcsun!mcsun!seunet!ericom!james.ericsson.se!etxerus
From: etxerus@james.ericsson.se (Hans Beckerus LG/THB)
Newsgroups: comp.os.msdos.programmer
Subject: Help! Environment variables
Message-ID: <1992Apr15.071624.4484@ericsson.se>
Date: 15 Apr 92 07:16:24 GMT
Sender: etxerus@james.ericsson.se
Followup-To: comp.sys.ibm.pc.programmer
Organization: Ericsson Telecom, Stockholm, Sweden
Lines: 24
Nntp-Posting-Host: james16.ericsson.se