[issue24493] subprocess with env=os.environ doesn't preserve environment variables when calling a 32bit process on Windows 8.1

2021-02-24 Thread Eryk Sun
Change by Eryk Sun : -- resolution: -> third party stage: -> resolved status: open -> closed ___ Python tracker ___ ___

[issue24493] subprocess with env=os.environ doesn't preserve environment variables when calling a 32bit process on Windows 8.1

2015-09-16 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo ___ Python tracker ___ ___

[issue24493] subprocess with env=os.environ doesn't preserve environment variables when calling a 32bit process on Windows 8.1

2015-09-16 Thread Florian Bruhin
Florian Bruhin added the comment: I just ran into this again - when trying to run `git` via subprocess with "env" set, I got: # Start the process try: hp, ht, pid, tid = _winapi.CreateProcess(executable, args, # no special

[issue24493] subprocess with env=os.environ doesn't preserve environment variables when calling a 32bit process on Windows 8.1

2015-09-16 Thread Florian Bruhin
Florian Bruhin added the comment: > Sounds like there's something in the cwd that is making the difference (this > being Windows which looks for things in the cwd always). The cwd is an empty temporary directory. And that still wouldn't explain why passing env=os.environ breaks it as well,

[issue24493] subprocess with env=os.environ doesn't preserve environment variables when calling a 32bit process on Windows 8.1

2015-09-16 Thread R. David Murray
R. David Murray added the comment: Sounds like there's something in the cwd that is making the difference (this being Windows which looks for things in the cwd always). -- nosy: +r.david.murray ___ Python tracker

[issue24493] subprocess with env=os.environ doesn't preserve environment variables when calling a 32bit process on Windows 8.1

2015-09-16 Thread eryksun
eryksun added the comment: The issue as I understand it is that, on this particular Windows 8.1 system, passing a non-NULL lpEnvironment to CreateProcess works when starting a native 64-bit executable, but fails when starting a 32-bit executable via the WOW64 system. The child process instead

[issue24493] subprocess with env=os.environ doesn't preserve environment variables when calling a 32bit process on Windows 8.1

2015-06-24 Thread Florian Bruhin
Florian Bruhin added the comment: I've now updated to Python 3.4.3 and it's broken there as well. I tried on two other Windows 8.1 machines (with Python 3.4.3 and 3.4.1 respectively), and I can't reproduce there either... It works with shell=True indeed. I wonder why this is only broken on

[issue24493] subprocess with env=os.environ doesn't preserve environment variables when calling a 32bit process on Windows 8.1

2015-06-23 Thread eryksun
eryksun added the comment: It seems only a minimal set of environment variables are set Apparently the initial environment is empty. The values you see are defaults set by cmd.exe when it starts. It also sets the 'hidden' variable =C: to the current directory on the C: drive, which you can

[issue24493] subprocess with env=os.environ doesn't preserve environment variables when calling a 32bit process on Windows 8.1

2015-06-23 Thread Florian Bruhin
Florian Bruhin added the comment: Sorry I missed this - I can reproduce this on Windows 8.1, but not on Windows 7. I hope I'll be able to try another Windows 8.1 machine today. SYSTEMROOT is definitely set in the original environment: os.environ['SYSTEMROOT'] 'C:\\Windows'