Putenv() & Getenv() Bug ?

Riccardo Pizzi pizzi at esacs.UUCP
Thu Feb 21 10:58:24 AEST 1991


In article <50356 at olivea.atc.olivetti.com> borzieri at KING.ICO.OLIVETTI.COM (ivan borzieri) writes:

>in the first  c module I call the system function "putenv()" which should
>set a variable in the environment.

Make sure you are not using an automatic variable for putenv().
To be safe, explicitly malloc() the space for the data you want to
putenv(). This should work.

Rick
-- 
Riccardo Pizzi @ ESA Software, Rimini, ITALY
e-mail: pizzi%esacs at relay.EU.net -or- root at xtc.sublink.org
Public Access Unix @ +39-541-27858 (Telebit)
<< Object Oriented is an Opaque Disease >>



More information about the Comp.unix.sysv386 mailing list