Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!zaphod.mps.ohio-state.edu!maverick.ksu.ksu.edu!ux1.cso.uiuc.edu!news From: mcdonald@aries.scs.uiuc.edu (Doug McDonald) Newsgroups: comp.lang.c Subject: Re: Putenv() & Getenv() Bug ? Message-ID: <1991Feb15.151849.5269@ux1.cso.uiuc.edu> Date: 15 Feb 91 15:18:49 GMT References: <50361@olivea.atc.olivetti.com> Sender: news@ux1.cso.uiuc.edu (News) Organization: University of Illinois at Urbana Lines: 34 In article <50361@olivea.atc.olivetti.com> borzieri@KING.ICO.OLIVETTI.COM (Ivan Borzieri) writes: >Hi, > >I URGENTLY need this information : > >I wrote two c modules called by a fortran main. >in the first c module I call the system function "putenv()" which should >set a variable in the environment. >In the second c module I call the system function "getenv()" to read >the value of the previous set variable. >The value returned by getenv() is NULL, id est, that variable >doesn't exist. > >Now my question is : is this right ? >I know that in C-Shell scripts, when you set variables you loose them >as you exit the script. >Is it the same or this is a operating system bug ? > >The system is SCO Unix System V 3.2 > I would have used e-mail, but this is getting my hackles up: This is a system-specific question. It has nothing to do with C or Fortran per se: It should be posted in an SCO Unix specific newsgroup, or at least a Unix specific newsgroup. Not a general one like comp.lang.c. I am not the slightest bit interested in Unix specific questions. Other people have posted the same sort of requests. Doug McDonald