args = list(args)
if shell:
- args = ["/bin/sh", "-c"] + args
+ # On Android the default shell is at '/system/bin/sh'.
+ unix_shell = ('/system/bin/sh' if
+ hasattr(sys, 'getandroidapilevel') else '/bin/sh')
+ args = [unix_shell, "-c"] + args
if executable:
args[0] = executable
Library
-------
+- Issue #16255: subrocess.Popen uses /system/bin/sh on Android as the shell,
+ instead of /bin/sh.
+
- Issue #28779: multiprocessing.set_forkserver_preload() would crash the
forkserver process if a preloaded module instantiated some
multiprocessing objects such as locks.