Mail Archives: djgpp/1995/02/06/02:12:43
>>is different. In fact, the *only* portable way to give
>>pathnames in #include directives is with the forward slash.
>
> It is decidedly *not* portable. ANSI doesn't say that <sys/....>
> notation has to be processed as subdirectory specification; in fact,
> the whole notion of how to supporFrom djgpp-bounces Mon Feb 6 10:55:09 1995
Received: by sun.soe.clarkson.edu (4.1/SMI-4.1)
id AA01338; Mon, 6 Feb 95 06:27:30 EST
Return-Path: <eliz AT is DOT elta DOT co DOT il>
Received: from is.elta.co.il by sun.soe.clarkson.edu (4.1/SMI-4.1)
id AA01334; Mon, 6 Feb 95 06:27:19 EST
Received: by is.elta.co.il (5.57/Ultrix3.0-C)
id AA04528; Mon, 6 Feb 95 13:18:54 +0200
Message-Id: <9502061118 DOT AA04528 AT is DOT elta DOT co DOT il>
To: Bill Davidson <bdavidson AT ra DOT isisnet DOT com>
Cc: djgpp AT sun DOT soe DOT clarkson DOT edu
Subject: Re: putenv() and system()
In-Reply-To: Your message of "Mon, 06 Feb 95 03:51:06 -0400."
<Pine DOT 3 DOT 89 DOT 9502060310 DOT A28097-0100000 AT ra DOT isisnet DOT com>
Date: Mon, 06 Feb 95 13:18:53 +0200
From: "Eli Zaretskii" <eliz AT is DOT elta DOT co DOT il>
X-Mts: smtp
> the COPY. When you call system() the shell gets its own copy of
> the (unmodified) master environment, because it gets from the same source
> your program did. So the flow is OS-->yourprog-->OS-->system().
No, it's OS-->myprog-->COMMAND.COM which is child of myprog-->child,
so it should work (as it does with other compilers).
The problem is, as far as I could see, that putenv() only
puts the variable into an environment block which is then
used by the spawnXXX() family, while system() is implemented
in the current version of the library by directly calling
go32 exception handler which is only passed the string you
give to system(). Thus, system() never sees the additional
environment variables you set with putenv().
- Raw text -