New submission from Kay Hayen <kay.ha...@gmail.com>:
Hello there, I am probably confusing myself. I am using this kind of code in Nuitka to emulate "os.execl" on Windows, and so far it never let me down: r = subprocess.call( args, shell = False ) print (r, args) sys.exit(r) When i execute my tests with Nuitka and Python 3.6 and everything before, this gives: 1 ['test_call.exe'] 1 ['C:\\Python36_32\\python.exe', '-S', '..\\..\\nuitka\\__main__.py', '--run', 'test/test_call.py'] And with python 3.7 it gives: 0 ['test_call.exe'] 0 ['C:\\Python37_32\\python.exe', '-S', '..\\..\\nuitka\\__main__.py', '--run', 'test/test_call.py'] So I am in Nuitka re-executing itself without the site module, and then immediately the created binary. For 3.7 it doesn't give me an error. I manually confirmed that "test_call.exe" indeed gives error code 1 as well, in both bash and cmd.exe, but it is not seen in the return value. Checking existing issues, I didn't find any hint at all, how this can be. I added "shell = False" to make it clear that no "cmd.exe" should be used, for which there had been issues. I also confirmed, by adding a exit(27), that if I simulate that "test_call.exe" gave 27, rather then 0, then that one is detected by the exec, so what could be going on here. But I am also sure I don't confuse binaries or so, plus it's working as expected in other Python versions than 3.7.0 here. This happens with 64 bits too, I am only citing 32 bits. And it is happening with just about every compiled unit test that gives an error exit, where otherwise e.g. tests that check for error exits to be the case work nicely. Thanks for any help or direction you can give me there. I am at loss. Yours, Kay ---------- components: Windows messages: 324897 nosy: kayhayen, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: subprocess.call wrong exit code type: behavior versions: Python 3.7 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue34615> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com