🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.amiga.tech
Article #256

problem with Manx's getenv() (and AmigaDOS enviroment variables)

#256
From: Richard A. Champeaux
Date: Tue, 27 Jun 1989 12:24
32 lines
2294 bytes
   I'm trouble using getenv() from inside a handler.  If I call getenv() 
before 'set' has been executed, the system hangs.  It doesn't matter what
variable has been set, just so long as set is executed before the 
getenv() is called.  I tried calling setenv() to set a dummy variable 
immediately before calling getenv(), but then it crashes on the setenv().
I have no trouble calling these routines from a regular program.  I have
a feeling that it has something to do with the handler being at a higher
priority than a regular program would be, which I guess keeps the enviroment
from being initialized.  Any ideas?

   Also, I had thought about scapping support of Manx enviroment variables,
and just use the AmigaDOS ones.  But, my God, they sure are hard to get at
from inside a handler.  You can't use Open(), Read(), or Close() from inside
a handller, so you have to build the packets and send them yourself.  
That sure is a lot of code and effort just to get at an enviroment variable.
Especially, since the RKM doesn't give enough info to figure it out, and 
trying to piece together 2 or 3 example programs ain't too much fun.
Did Commodore write functions to read and write enviroment variables?  If
not, they should have.  Is there anyone out there that has written such a
thing?  Better yet, is there anyone out there who has written, or is willing
to write, replacements for Open(),Read(), etc., that don't use the process's
message port?

Any help would be greatly appreciated.  Especially if it's example code on how
to create a packet and send it to a handler.  I've dealt with packets from
the handler's side, but there's not much to do there; just play with the
arguments and call returnpkt() when your done.

Thanks,

Rich Champeaux  (rachamp@mbunix.mitre.org)
Technical Details
Message-ID: <57878@linus.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!cs.utexas.edu!usc!ucla-cs!uci-ics!zardoz!tgate!ka3ovk!drilex!axiom!linus!mbunix!rachamp

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!cs.utexas.edu!usc!ucla-cs!uci-ics!zardoz!tgate!ka3ovk!drilex!axiom!linus!mbunix!rachamp
From: rachamp@mbunix.mitre.org (Richard A. Champeaux)
Newsgroups: comp.sys.amiga.tech
Subject: problem with Manx's getenv() (and AmigaDOS enviroment variables)
Message-ID: <57878@linus.UUCP>
Date: 27 Jun 89 12:24:52 GMT
Sender: news@linus.UUCP
Reply-To: rachamp@mbunix.mitre.org (Champeaux)
Organization: The MITRE Corporation, Bedford, Mass.
Lines: 32