http://bugs.winehq.org/show_bug.cgi?id=16968
Summary: environment variables not passed across to commands that are run with popen Product: Wine Version: unspecified Platform: Other OS/Version: other Status: UNCONFIRMED Severity: enhancement Priority: P2 Component: -unknown AssignedTo: wine-bugs@winehq.org ReportedBy: lkcl@lkcl.net
this is the python test from test_os.py, but it should work equally as well in straight c-code. the only reason this test _happened_ to be run at all is because i have msys installed. normally, under windows, this test would be entirely skipped.
# Bug 1110478 def test_update2(self): if os.path.exists("/bin/sh"): os.environ.update(HELLO="World") value = os.popen("/bin/sh -c 'echo $HELLO'").read().strip() self.assertEquals(value, "World")