Title Exit code from executed progam under Windows is always lost
Priority bug Status resolved
Superseder Nosy List kayhayen
Assigned To kayhayen Keywords windows, wrong_execution

Created on 2012-01-15.10:03:32 by kayhayen, last changed by kayhayen.

msg529 (view) Author: kayhayen Date: 2013-12-05.14:08:17
Released as 0.4.7
msg505 (view) Author: kayhayen Date: 2013-11-08.23:57:34
Does not need threading, can do it just fine.
msg368 (view) Author: kayhayen Date: 2013-06-12.22:01:14
Threading is now supported, could be done.
msg103 (view) Author: kayhayen Date: 2012-07-08.09:19:37
It can be done with a thread and that waiting for the exit, and using win32 to 
get the exit code. For now it is not possible, because threading is not well 
msg63 (view) Author: kayhayen Date: 2012-01-22.17:18:56
It seems Windows has no "exec", so it needs to be decided if on that platform we 
need to spawn and wait for exit, possibly closing down on memory as much as 
msg62 (view) Author: kayhayen Date: 2012-01-17.06:39:43
As a workaround, "compare_with_cpython" now supports a mode 
"two_step_execution", which doesn't use the "--execute" feature, but does it 
manually. On Windows, this mode is becoming the default.

The MinGW bug was raises as

But it appears, it may not receive a solution soon, so this workaround will do 
for now.
msg61 (view) Author: kayhayen Date: 2012-01-16.06:17:44
Seems to be reproducible for "execl" with latest MinGW. Bug raised.
msg60 (view) Author: kayhayen Date: 2012-01-15.22:34:19
It is reproducible for "os.execl" to do this already. Should be an upstream bug 
msg59 (view) Author: kayhayen Date: 2012-01-15.10:03:32
When executing programs under Windows (not wine), their exit codes get lost. It 
is only due to the recent additions of checking exit codes, that this becomes 

Should be reproducable with which has other issues corrected that 
prevent tests from progressing as far.

python.exe misc\check-release

at the end it is this test:


which raises an exception as expected, but then exit code is "0", while there is 
a "return 1" in the code. I have verified that the "return 1" becomes executed 
and yet the code is still "0". Running the test on wine (--windows-target) works 
fine, exit code is correct there.
Date User Action Args
2013-12-05 14:08:17kayhayensetstatus: testing -> resolved
messages: + msg529
2013-11-08 23:57:34kayhayensetstatus: deferred -> testing
messages: + msg505
2013-06-12 22:01:14kayhayensetmessages: + msg368
2012-07-08 09:19:37kayhayensetstatus: chatting -> deferred
messages: + msg103
2012-01-22 17:18:56kayhayensetstatus: done-cbb -> chatting
messages: + msg63
2012-01-17 06:39:43kayhayensetstatus: chatting -> done-cbb
assignedto: kayhayen
messages: + msg62
keyword: - help_wanted
2012-01-16 06:17:44kayhayensetmessages: + msg61
2012-01-15 22:34:19kayhayensetmessages: + msg60
2012-01-15 10:03:32kayhayencreate