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")
http://bugs.winehq.org/show_bug.cgi?id=16968
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download, source, testcase
http://bugs.winehq.org/show_bug.cgi?id=16968
--- Comment #1 from Luke Kenneth Casson Leighton lkcl@lkcl.net 2009-01-18 05:45:36 --- just to say before i forget: what happens is that there's a syntax error reported, saying soemething about missing quote. which obviously it isn't.
http://bugs.winehq.org/show_bug.cgi?id=16968
--- Comment #2 from Luke Kenneth Casson Leighton lkcl@lkcl.net 2009-01-18 05:53:48 --- investigating, if you change the single-quotes to double-quotes, "World" gets printed (hooray)....
.... on the console of the process that _ran_ wine, not the process... oh frickin 'ell, the /bin/sh.exe process is having its stdin and stdout connected to the wrong damn thing!
ahh, no woonder i'm having problems with msys under wine, and no wonder there are problems starting up python.exe interactively, sometimes! the damn python.exe gets its stdin and stdout connected to my xterm, not to the msys rxvt.exe !!!
... how fascinating...
http://bugs.winehq.org/show_bug.cgi?id=16968
Luke Kenneth Casson Leighton lkcl@lkcl.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Version|unspecified |1.1.13
--- Comment #3 from Luke Kenneth Casson Leighton lkcl@lkcl.net 2009-01-18 14:57:31 --- ok this seems to have been fixed, in 1.1.13
http://bugs.winehq.org/show_bug.cgi?id=16968
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |FIXED
--- Comment #4 from Austin English austinenglish@gmail.com 2009-01-18 17:06:41 --- Fixed.
http://bugs.winehq.org/show_bug.cgi?id=16968
Luke Kenneth Casson Leighton lkcl@lkcl.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |UNCONFIRMED Resolution|FIXED |
--- Comment #5 from Luke Kenneth Casson Leighton lkcl@lkcl.net 2009-01-19 07:41:53 --- see #17031 - problem hasn't gone away, it's just that wine 1.1.13 is faster than 1.0.1.
my guess is this:
on a popen of /bin/sh.exe as compared to a popen of /mingw/bin/gcc.exe, /bin/sh.exe is much slower to load up, so it takes much longer before it wants to access its stdin and stdout.
and wine 1.1.13 is much faster at "getting round to preparing" stdin and stdout.
but, 1.1.13 can't quite beat gcc.exe to wanting to access its stdin and stdout.
http://bugs.winehq.org/show_bug.cgi?id=16968
--- Comment #6 from Austin English austinenglish@gmail.com 2010-09-09 00:45:34 CDT --- For me in 1.3.2/python26, the script exits silently, with single or double quotes.
http://bugs.winehq.org/show_bug.cgi?id=16968
--- Comment #7 from butraxz@gmail.com 2013-03-04 14:50:33 CST --- This has not been updated for two years. Is this an issue in 1.5.25 or should this be closed as abandoned ?
http://bugs.winehq.org/show_bug.cgi?id=16968
--- Comment #8 from Luke Kenneth Casson Leighton lkcl@lkcl.net 2013-03-04 18:37:48 CST --- no, because it's a very specific and quite obscure bug.
actually, there's a bug in python 2.5 which shows that there is a corresponding bug in wine, and this is the best repro case to show it.
if you use python 2.6, the bug in python 2.6 is fixed (correct initialisation of stdin / stdout during python 2.6 startup) and the problem DOES NOT occur.
it is only when stdin / stdout is incorrectly initialised - as is done in python 2.5 - that the bug in wine occurs, i.e. the stdin/stdout gets sent to the xterm in which wine was started up rather than dropping it on the floor.
if you install python 2.5 under w32, and run "python.exe" from CMD.EXE, you will find that you have to press <return> a couple of times in order to get it to wake up. once this "hiccup" is correctly duplicated under wine, then you will know that you have the problem correctly fixed.
https://bugs.winehq.org/show_bug.cgi?id=16968
joaopa jeremielapuree@yahoo.fr changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jeremielapuree@yahoo.fr
--- Comment #9 from joaopa jeremielapuree@yahoo.fr --- Does the bug still occur with current wine(4.0-rc1)?