This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author kayhayen
Recipients brian.curtin, kayhayen, pitrou, tim.golden
Date 2012-01-16.06:08:48
SpamBayes Score 1.810111e-10
Marked as misclassified No
Message-id <1326694129.84.0.0913527023733.issue13792@psf.upfronthosting.co.za>
In-reply-to
Content
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
History
Date User Action Args
2012-01-16 06:08:49kayhayensetrecipients: + kayhayen, pitrou, tim.golden, brian.curtin
2012-01-16 06:08:49kayhayensetmessageid: <1326694129.84.0.0913527023733.issue13792@psf.upfronthosting.co.za>
2012-01-16 06:08:49kayhayenlinkissue13792 messages
2012-01-16 06:08:48kayhayencreate