Subject: RE: [BUG] environment not inherited by fork
From: [email-masked] (Sergey Okhapkin)

15 Jun 1997 08:11:39 -0700
Approved: [email-masked]
Distribution: cygnus
Message-ID: <01BC79B5.C4FA49F0.cygnus.gnu-win32@sos>
Original-To: "[email-masked]" <[email-masked]>,
        "[email-masked]'"
	 <[email-masked]>
Encoding: 33 TEXT
Original-Sender: [email-masked]

Chris Faylor wrote:
> The following code illustrates a problem with cygwin.dll b18 (the Cygnus
> release version).
> 
> #include <stdio.h>
> main(int argc, char **argv)
> {
> putenv("FOO=BAR");
> printf("parent FOO=%s\n", getenv("FOO"));
> if (fork() > 0) {
>     wait(0);
>     exit(0);
> }
> printf("child FOO=%s\n", getenv("FOO"));
> exit(0);
> }
> 
> It erroneously produces the following output:
> 
> parent FOO=BAR
> child FOO=(null)
> 

The same program with the patch I've posted today:

E:\usr\src>t.exe
parent FOO=BAR
child FOO=BAR

-- 
Sergey Okhapkin, http://www.lexa.ru/sos
Moscow, Russia
Looking for a job

-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".