delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1995/02/08/10:50:24

To: Bill Davidson <bdavidson AT ra DOT isisnet DOT com>
Cc: Long Doan <ldoan1 AT osf1 DOT gmu DOT edu>, 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" <eliz AT is DOT elta DOT co DOT il>

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019