summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAvery Pennarun <apenwarr@gmail.com>2011-05-03 13:51:09 -0700
committerAvery Pennarun <apenwarr@gmail.com>2011-05-03 13:51:09 -0700
commit65b0390fe9fd403ab0593155dcd731e7a2ce1c98 (patch)
tree0820e324393fda9af972a7e0767e63993852db92
parentc5834a9773454e6b4f742bc357c9fcdeebf6faff (diff)
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.
-rw-r--r--ssh.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/ssh.py b/ssh.py
index c7be991..c4bf06e 100644
--- a/ssh.py
+++ b/ssh.py
@@ -85,7 +85,7 @@ def connect(ssh_cmd, rhostport, python, stderr, options):
pycmd = "'%s' -c '%s'" % (python, pyscript)
else:
pycmd = ("P=python2; $P -V 2>/dev/null || P=python; "
- "\"$P\" -c '%s'") % pyscript
+ "exec \"$P\" -c '%s'") % pyscript
argv = (sshl +
portl +
ipv6flag +