www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1995/02/07/07:12:38

To: Long Doan <ldoan1 AT osf1 DOT gmu DOT edu>
Cc: Bill Davidson <bdavidson AT ra DOT isisnet DOT com>, djgpp AT sun DOT soe DOT clarkson DOT edu
Subject: Re: putenv() and system()
Date: Tue, 07 Feb 95 08:54:21 +0200
From: "Eli Zaretskii" <eliz AT is DOT elta DOT co DOT il>

> When the program calls putenv (), it only modifies its own copy of the 
> environment, which will be coppied to the child process's stack. But 
> when system () is called, command.com looks at DOS's copy of the 
> environment, which doesn't have the modification.

That copy to child's stack happens only when spawn() is called.
This is different from other DOS compilers, where putenv() also
affects system().  Fortunately, in v2.0 system() calls spawn().

- Raw text -


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