This is the mail archive of the
cygwin@sourceware.cygnus.com
mailing list for the Cygwin project.
environ
- To: GNU-Win32 at cygnus dot com (Cygnus Discussion)
- Subject: environ
- From: crvich at raleigh dot ibm dot com (Ernest Crvich)
- Date: Fri, 9 May 1997 09:11:11 -0400 (EDT)
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".