Skip to content

Commit 65b0390

Browse files
committed
ssh.py: use 'exec python -c' instead of just 'python -c'.
This gets rid of an extra intermediate sh process on the server that we were keeping for no good reason, since it would exit as soon as python exited anyway.
1 parent c5834a9 commit 65b0390

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: ssh.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def connect(ssh_cmd, rhostport, python, stderr, options):
8585
pycmd = "'%s' -c '%s'" % (python, pyscript)
8686
else:
8787
pycmd = ("P=python2; $P -V 2>/dev/null || P=python; "
88-
"\"$P\" -c '%s'") % pyscript
88+
"exec \"$P\" -c '%s'") % pyscript
8989
argv = (sshl +
9090
portl +
9191
ipv6flag +

0 commit comments

Comments
 (0)