Mail Archives: cygwin/1997/01/24/19:35:53
We are in the midst of porting a large collection of CGIs to NT and
have found the gnu-win32 b17 utilities very helpful. However, some
nagging problems with environment variables are causing us major
headaches.
First, env.exe does not work as advertised. Specifically, it
appears to be missing the full fuunctionality it has in UNIX, i.e.
env [ option ]... [ name=value ]... [ command [ args ]... ]
using env to report environment settings works fine. Setting several
name=value pairs also seems to work fine except that those settings
are not acually maintained when [ command [ args ]... ] is executed.
neither are they maintained for any further commands or programs
executed. For example, assume your current environment looks like:
FOO=garbage
BAR=cleanup
and you run a simple script like this to show the environment, modify
a few settings, and then display them:
env ; env FOO=testing BAR=this env
In UNIX, this would produce something like
FOO=garbage
BAR=cleanup
FOO=testing
BAR=this
Under gnu-win32 bash this does not work and will return
FOO=garbage
BAR=cleanup
FOO=garbage
BAR=cleanup
The strange thing about this is that export works correctly, so that
a modified script like:
env ; export FOO=testing ; export BAR=this ; env
will produce the correct results.
It appears that the problem is not limited env.exe but is a much
deeper bug that may be related to problems in popen(). We have
several CGIs that use popen() and setenv(), but under NT gnu-win32
these functions do not appear to work correctly, meaning that we
cannot spawn external processes that have an environment different
from the parent.
Are we missing something simple? Has anyone else encountered this
problem? Any help would be greatly appreciated.
Aubrey McAuley <aubrey AT eden DOT com> ---- Fineep ----
/---------------------------------------------------------------------\
| The Eden Matrix Online Service Adhesive Media, Inc. |
| Web URL http://www.eden.com 101 W.6th,#210, Austin, TX 78701 |
| voice: 512-478-9900, x201 dialup: 512-478-9963 |
\---------------------------------------------------------------------/
-
For help on using this list, send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".
- Raw text -