[issue16255] subrocess.Popen needs /bin/sh but Android only has /system/bin/sh
New submission from Ben Rousch: The subprocess.Popen function uses /bin/sh in Unix environments. Android is detected as a Unix environemnt, but has moved that executable to /system/bin/sh. This can be worked around by adding a parameter "executable='/system/bin/sh'" to the call, but it is impractical to do this for every call to Popen in every library and codebase. For subprocess.Popen to work on Android, Popen needs to be able to detect if /bin/sh is not there and try /system/bin/sh instead. -- components: Library (Lib) messages: 173093 nosy: brousch priority: normal severity: normal status: open title: subrocess.Popen needs /bin/sh but Android only has /system/bin/sh type: crash versions: Python 2.7 ___ Python tracker <http://bugs.python.org/issue16255> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16255] subrocess.Popen needs /bin/sh but Android only has /system/bin/sh
Ben Rousch added the comment: @rpetrov thanks for finding that - I was having trouble hunting down what the standard is. I think you're quoting from http://pubs.opengroup.org/onlinepubs/009695399/utilities/sh.html -- ___ Python tracker <http://bugs.python.org/issue16255> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16255] subrocess.Popen needs /bin/sh but Android only has /system/bin/sh
Ben Rousch added the comment: > Is there some document describing procedure for > building/installing/running_tests at Android device? I'm using the android-python27 project, but you can also reproduce it under SL4A: Start SL4A Menu -> View -> Interpreters Python 2.6.2 or Python 3 >>> from subprocess import Popen >>> p = Popen("ls", shell=True) *Fails* OSError: [Error 2] No such file or directory >>> p = Popen("ls" shell=True, executable="/system/bin/sh") *Works* -- ___ Python tracker <http://bugs.python.org/issue16255> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com