From: crvich@raleigh.ibm.com (Ernest Crvich)
Subject: environ
9 May 1997 17:25:13 -0700
Approved: cygnus.gnu-win32@cygnus.com
Distribution: cygnus
Message-ID: <9705091311.AA24558.cygnus.gnu-win32@ode1.raleigh.ibm.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Original-To: GNU-Win32@cygnus.com (Cygnus Discussion)
X-Mailer: ELM [version 2.4 PL22]
Original-Sender: owner-gnu-win32@cygnus.com

	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".
