environ
Ernest Crvich
crvich@raleigh.ibm.com
Fri May 9 10:58:00 GMT 1997
I tried beta 18 out on my sample environ test, and it still
fails. This program works fine on OS/2 (EMX 0.9c), AIX (gcc 2.6.0)
Solaris (gcc 2.7.2), and HP-UX (native cc)...i.e., the envvar ZZZZZ
appears in the list that DumpEnv() prints out. On Win NT 4.0 with
cygwin32 beta 17.1 or 18, ZZZZZ does not appear in the env dump.
Strangely, if an "execlp( "cmd", "cmd", 0 );" is inserted
into main() (instead of or after DumpEnv()), the cmd shell *does*
show the ZZZZZ variable.
Here it is:
--------------------------
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
DumpEnv()
{
int i;
for (i=0; environ[i]; ++i)
printf( "%s\n", environ[i] );
}
main()
{
putenv( "ZZZZZ=value" );
DumpEnv();
}
--------------------------
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".
More information about the Cygwin
mailing list