Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Lib/subprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
import io
import os
import time
import shlex
import signal
import builtins
import warnings
Expand Down Expand Up @@ -1209,7 +1210,8 @@ def _execute_child(self, args, executable, preexec_fn, close_fds,
# 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
cmdline = " ".join(shlex.quote(x) for x in args)
args = [unix_shell, "-c", cmdline]
if executable:
args[0] = executable

Expand Down