[issue13792] The "os.execl" call doesn't give programs exit code

Amaury Forgeot d'Arc report at bugs.python.org
Tue Jan 17 08:26:41 CET 2012


Amaury Forgeot d'Arc <amauryfa at gmail.com> added the comment:

immediately execute the created executable file. For that I am using
"os.execl" to immediately replace the compiler and run the freshly created
binary instead.
>
> This worked well so far, but as of late, I am also checking the exit
codes, and it turns out that even for failing programs, the exit code is
"0" on Windows, even though the compiled binary is exiting with "1".

This is expected behavior on Windows: exec does not replace the existing
process like with Unix, it creates a new process and exit(0) the caller.

----------
nosy: +Amaury.Forgeot.d'Arc

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue13792>
_______________________________________


More information about the Python-bugs-list mailing list