[comp.sys.3b1] Putenv

borzieri@KING.ICO.OLIVETTI.COM (Ivan Borzieri) (02/15/91)

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

							Thanks,
							Ivan Borzieri