[issue37067] os.execl doesn't allow for empty string in mac

2019-05-28 Thread Ned Deily
Ned Deily added the comment: The behavior was changed in Python 3.6 for all platforms to catch this error; see Issue28732. -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker

[issue37067] os.execl doesn't allow for empty string in mac

2019-05-27 Thread Ronald Oussoren
Ronald Oussoren added the comment: Which exact python version did you test? The current codebase raises this exception on all platforms, not just macOS (see os_execv_impl in Modules/posixmodule.c) The behaviour of raising an exception was introduced in issue 28732 for Windows, not sure whe

[issue37067] os.execl doesn't allow for empty string in mac

2019-05-27 Thread Siming Yuan
Siming Yuan added the comment: actually just learned that argv0 is program name. in that case is that because of a platform difference where in macOS it doesn't allow for program name to be '' and in linux it does? -- ___ Python tracker

[issue37067] os.execl doesn't allow for empty string in mac

2019-05-27 Thread Siming Yuan
New submission from Siming Yuan : the following works in Linux import os os.execl('/bin/bash', '') doesn't in mac: >>> import os >>> os.execl('/bin/bash', '') Traceback (most recent call last): File "", line 1, in File "/Users/me/.pyenv/versions/3.6.4/lib/python3.6/os.py", line 527, in ex