Putenv() & Getenv() Bug ?

Ivan Borzieri borzieri at KING.ICO.OLIVETTI.COM
Fri Feb 15 21:13:19 AEST 1991


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



More information about the Comp.unix.questions mailing list