Kay Hayen <kayha...@gmx.de> added the comment:

Well, I saw that code, but expected that there must be more to it. But I found 
out, the bug is actually caused by at least MinGW. See below how I build a 
program with it, that does "execl" on an error exiting program and then the 
"errorlevel" variable is "0", whereas direct execution gives "1".

I don't have MSVC installed, so I cannot tell if it is affected as well. I will 
report this as a bug to MinGW then.

c:\Users\hayen\Nuitka>gcc -v
Es werden eingebaute Spezifikationen verwendet.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=c:/mingw/lib/../libexec/gcc/mingw32/4.6.2/lto-wrapper.exe
Ziel: mingw32
Konfiguriert mit: ../gcc-4.6.2/configure --enable-languages=c,c++,ada,fortran,ob
jc,obj-c++ --disable-sjlj-exceptions --with-dwarf2 --enable-shared --enable-libg
omp --disable-win32-registry --enable-libstdcxx-debug --enable-version-specific-
runtime-libs --build=mingw32 --prefix=/mingw
Thread-Modell: win32
gcc-Version 4.6.2 (GCC)

c:\Users\hayen\Nuitka>gcc exec_sample.cpp

c:\Users\hayen\Nuitka>type exec_sample.cpp

#include <unistd.h>
#include <stdio.h>


int main()
{
    puts( "Hello bad world!" );

    execl( "badprogram.exe", "badprogram", "what" );

    puts( "Look, this is not happening!" );
    return 2;
}


c:\Users\hayen\Nuitka>.\a.exe
Hello bad world!

c:\Users\hayen\Nuitka>Traceback (most recent call last):
  File "tests\syntax\RelativeNonPackageImport.py", line 20, in <module>
    from . import whatever
ValueError: Attempted relative import in non-package

c:\Users\hayen\Nuitka>echo %errorlevel%
0

c:\Users\hayen\Nuitka>.\badprogram.exe
Traceback (most recent call last):
  File "tests\syntax\RelativeNonPackageImport.py", line 20, in <module>
    from . import whatever
ValueError: Attempted relative import in non-package

c:\Users\hayen\Nuitka>echo %errorlevel%
1

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue13792>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to