Subject: environ
From: [email-masked] (Ernest Crvich)

9 May 1997 17:25:13 -0700
Approved: [email-masked]
Distribution: cygnus
Message-ID: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Original-To: [email-masked] (Cygnus Discussion)
X-Mailer: ELM [version 2.4 PL22]
Original-Sender: [email-masked]

	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
"[email-masked]" with one line of text: "help".