New submission from Siming Yuan <simin...@gmail.com>:
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 "<stdin>", line 1, in <module> File "/Users/me/.pyenv/versions/3.6.4/lib/python3.6/os.py", line 527, in execl execv(file, args) ValueError: execv() arg 2 first element cannot be empty works if you add a space >>> os.execl('/bin/bash', ' ') notice the space in 2nd argument. technically it is also possible to run a command without arguments - why not allow for the case where *args is []? >>> os.execl('/bin/bash') Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/Users/siyuan/.pyenv/versions/3.6.4/lib/python3.6/os.py", line 527, in execl execv(file, args) ValueError: execv() arg 2 must not be empty >>> ---------- components: macOS messages: 343655 nosy: ned.deily, ronaldoussoren, siming85 priority: normal severity: normal status: open title: os.execl doesn't allow for empty string in mac versions: Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue37067> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com