To: Bill Davidson Cc: Long Doan , djgpp AT sun DOT soe DOT clarkson DOT edu Subject: Re: putenv() and system() Date: Wed, 08 Feb 95 14:19:58 +0200 From: "Eli Zaretskii" > right, I was wrong. (I seldom admit that!) TC and gcc are completely > divergent in their treatment of putenv() and system(), Not only TC, but also MSC and any other DOS-based compiler except DJGPP do this thusly. It is, after all, the expected behavior, and system() is an ANSI function. > and a re-reading > of Long Doan's post makes it clear that this has something to do with > the interaction of go32 and the program in question. Mea culpa. The problem is, as I wrote in a previous message, that in the current version of the library, system() is implemented as a direct call to go32, and go32 doesn't get the (possibly modified) environment variables from the application. It simplemindedly switches to real-mode and calls system(), whereas it should have get the environment and call putenv() before that. I hear that in v2.0 system() calls spawn(), so this problem will go away.